0
Python break and continue
4 Answers
+ 3
NaveenKumar R.K Is this your problem or asking question and giving self answer for badge.
0
month = int(input('enter month in number : '))
day = 1
while day <= 31:
if month == 2 and day > 28:
break if month == [ 1,3,5,7,10,12 ] and day > 31:
day + 1
continue
if month == [4,6,9,11] and day > 30:
day += 1
continue
print (day)
day += 1
0
Run this program
0
Hi.
Please what's wrong with this code ?
total = 0
#your code goes here
i=1
while i < 6:
age = int(input())
if age <= 3:
continue
elif age > 3:
total += 100
print(total)
i = i + 1
print(total)