Answer:
Program for problem 1:
Month_name=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] # List which holds the month name.
Program for problem 2 :
Month_name=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] # List which holds the month name.
for x in range (0,12): # loop which is used to print the name and number of the month.
print(str(x+1)+" "+Month_name[x]) # It will print the number and month name.
Output of problem 1:
The program for problem 1 has no output because it has no print statement.
Output of problem 2:
The above program will print all the months with their number in which the first text will print the number of the month and the second text will print the name of the month.
Explanation:
Missing information:
"Design the program for problem 1 and problem 2" is missing on the above question.
Detailed Explanation:
- The above program is in python language in which the first line creates a list of the names of the months.
- Then the "for loop" is used to print the number and name of the program.
- In this "for loop", the list index is printed by adding 1 on it with the value which is the name of the month.
- It is because the list starting index value is 0 and the ending index value is size-1.