# Arup Guha
# 10/13/2020
# Basic Function Example - idea of function main
# Illustrates a function taking in a parameter.
# Edit of calendar5.py --> we will add 7 days to each subsequent month!

def main():

    # Get month and days for calendar.
    numMonths = int(input("How many months do you want to print?\n"))
    numDays = int(input("How many days in a month?\n"))
    
    # Go to each month.
    for month in range(1,numMonths+1):

        # Month header.
        print("Month",month)

        # Prints one month! Calling the one month function
        oneMonth(numDays+(month-1)*7)

        # Blank line after each month.
        print()

def oneMonth(days):

    # Header for calendar.
    print("S\tM\tT\tW\tR\tF\tS")

    # Loop through days.
    for day in range(1,days+1):

        # Safe to print the day with a tab.
        print(day,end="\t")

        # If we're at the end of the week, go to a new line.
        if day%7 == 0:
            print()

# Run it!
main()
