- 3
Please explain if possible:
What's the output? X =1 While x<5: If x==3: Print (x+10) X+=1 Answer: 13
4 Answers
+ 4
â˘X is one.
â˘X gets added if X is not equal to three.
â˘When X is 3 it is printed after adding 10.
â˘X keeps getting adding until it reaches 5.
+ 1
== checks if two values are equal
= assigns a value to a variable
if x == 3 -> if x is equal to 3
0
Äheyat, == might mean equals in a statement, rather then giving a variable a value (=). But you could be right, it's always confused me