Does anyone know why it is stated in this code that num starts at -1? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Does anyone know why it is stated in this code that num starts at -1?

num=-1 total =0 while num!= 0: num= int(input("Please enter a number")) total += num print("The total is", total)

9th Dec 2019, 8:30 AM
Esteban Rueda
Esteban Rueda - avatar
0 Answers