-2
num1 = 29
num1 + 1
print(num1)

Output is 29 , but i want num1 to be 30

Tomato Master
  • 371
  • 2
  • 10

1 Answers1

2

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.

ZINE Mahmoud
  • 1,193
  • 1
  • 13
  • 30
Josh
  • 21
  • 3