Write a while program to keep on entering the number until the user do not enter zero...
This is a python program..
Answers
Answered by
2
Answer:
while true:
var = int(input("Enter some number: "))
if var != 0:
continue
else:
exit("Done!")
break
Explanation:
here var is the input, now if the input is not equal to zero then it will continue and if it is equal to 0 then it will print Done! and exit
OUTPUT
Enter some number: 32
Enter some number: 0
Done!
Answered by
1
Question:-
- Write a while program to keep on entering the number until the user do not enter zero.
Program:-
while true:
n=int(input("Enter a number: "))
if(n==0):
break
Similar questions