num1 = 29
num1 + 1
print(num1)
Output is 29 , but i want num1 to be 30
num1 = 29
num1 + 1
print(num1)
Output is 29 , but i want num1 to be 30
You assigned num1
to 29
. So, when you print num1
, 29
would be the output. Try assigning the answer as "sum"
.
num1=29
sum = num1 + 1
print(sum)
This should show the correct answer.