HW5Q4

 avatar
user_7676782
python
2 years ago
378 B
2
Indexable
Never
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