- 1

total = 0 while True: # prompt the user to enter a number num = input("Enter a number (or type 'no more' to stop): ")

can anyone tell me the logic of this code

26th Dec 2022, 1:15 PM
Udit pratap singh
Udit pratap singh - avatar
1 Resposta
+ 5
If you write it in a single line, it is a syntax error and won't work.
26th Dec 2022, 1:29 PM
Tibor Santa
Tibor Santa - avatar