Answer to Question #200725 in Python for Naresh

Question #200725

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


1
Expert's answer
2021-05-30T07:28:46-0400
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
APPROVED BY CLIENTS