HW5Q4
user_7676782
python
3 years ago
378 B
8
Indexable
def printDays(numOfDays):
if numOfDays == 1:
print(numOfDays)
return
printDays(numOfDays - 1)
print(numOfDays)
lst_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
month = int(input("Enter a number of month:"))
index = 0
while index <= 12:
if index == month - 1:
printDays(lst_month[index])
index += 1
Editor is loading...