ExpertAnuj Shrestha
Tech Lead @Programiz
Answered 3 questions
About
Hi, I’m Anuj, Tech Lead at Programiz. I don’t usually answer, unless I have to. If you’re seeing me here, it means I had to.

In Python, semicolons are optional and are generally not used. You can add one at the end of a line, but it isn’t required.
Feel free to try the code below in the editor on the right (or switch to the Code tab if you’re on mobile):
print("Hello, World!");You'll see this code works just fine.
And I see you’ve started your Python journey. Nice... If you have more questions along the way, just let me know.

Hi! Good observation but the summary is actually correct, and the confusion usually comes from how the word immutable is used.
In Python, a set itself is mutable. This means you can add or remove items from a set after it’s created, which is why the table correctly marks Set → Mutable: Yes.
immutable are the elements inside a set. Every item stored in a set must be immutable (for example: numbers, strings, or tuples). This is why you cannot put lists or other sets inside a set.
So to summarize:
Set (container): Mutable ✅
Elements inside a set: Must be immutable ✅
If a lesson mentioned that “sets are immutable,” it was likely referring to the elements of a set, not the set itself.
Hope this clears your confusion. Feel free to ask again. I will take a look at the previous lesson too to make sure we are clarifying it properly. Thanks for asking.

Hi Az! That’s a great question, and I really like your mindset of trying to understand why things behave the way they do. This approach is very important when learning programming, keep it up.
To answer your question, in Java, the data types of the operands used in an operation determine how the calculation is performed.
In this code:
class Main {
public static void main(String[] args) {
int number = 12;
int result = number / 8;
System.out.println(result);
}
}
Both number and 8 are of type int. Because of this, Java performs integer division.
Integer division removes the decimal part, so 12 / 8 is evaluated as 1, which is why the output is 1.
Even if you store the result in a double, the calculation still happens using integers:
int number = 12;
double result = number / 8;
System.out.println(result); // prints 1.0
Here, the division produces 1 first, and then Java converts it to 1.0 when assigning it to the double.
To get a decimal result like 1.5, at least one operand must be a double before the division and data type of variable used as result should be double too:
class Main {
public static void main(String[] args) {
int number = 12;
double result = number / 8.0;
System.out.println(result); // 1.5
}
}
Here, 8.0 is a double, so Java uses floating-point division and preserves the decimal value.
Hope that helps. Feel free to reply here or in any other topics if you have doubts.