Answer to Question #301225 in Python for sashi

Question #301225

Given the number of the month, write a program to print the name of the month.


1
Expert's answer
2022-02-22T12:13:22-0500
monthNumber = int(input('Enter month number: '))


month = {
  1: 'January',
  2: 'February',
  3: 'March',
  4: 'April',
  5: 'May',
  6: 'June',
  7: 'July',
  8: 'August',
  9: 'September',
  10: 'October',
  11: 'November',
  12: 'December',
}




print(month.get(monthNumber, 0))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog