14.5k views
0 votes
1

CSCI 341

0 Assignment 3

(100



Write a program that defines symbolic constants for all
twelve months of the year




1 Answer

2 votes

Answer:

Lis=["Nothing","January", "February", "March", "April", "May", "June", "August", "September", "October", "November", "December"]

a= input(" Enter the Month Sequence Number")

print(Lis[int(a)])

Step-by-step explanation:

We have created the list, and added each month name in it. We have added Nothing for 0 as 0 does not stands for any month, but list starts from 0 by default. We finally input a number, and displays the month meant by that sequence number, like september for 8.

User Wcrane
by
4.1k points