Wa0009.
Wa0009.
Model Questions.
Conditio False
n
Tru
Statements in
body of the loop
6) Develop a python program to find the biggest of three numbers
while num != 0:
digit = num % 10
reversed_num = reversed_num * 10 + digit
num //= 10
factorial = 1
# initialize sum
sum = 0
26) Write a Python program to reverse a number and also find the
sum of digits of the number. Prompt the user for input.
print("with break")
for i in range(1, 4):
print(i)
break
else: # Not executed as there is a break
print("No Break")
output
1
2
3
No Break
with break
1
31) Differentiate while loop and while loop with else case with
examples.
output
1
2
4
5
6
7
8
9