In: Computer Science
Based on the following Python code, write a Python statement which outputs “December” when the value of the Month is 12 or “November” when the value of the Month is 11 or “Neither” when value of the Month is neither 11 or 12. The user enters the value which is store in the variable namedMonth.
Month = int(input("Please enter the value of the month in numerical format such as 11 for November, or 12 for December: " ))
sing Python
# PLEASE LIKE THE SOUTION
# FEEL FREE TO DISCUSS IN COMMENT SECTION
# PYTHON PROGRAM
#main method
def main():
# ask user for input of month
Month = int(input("Please enter the value of the month
in numerical format such as 11 for November, or 12 for December: "
))
# nowcheck for monthvalue and print
# if 11
#print("November")
# if 12
#print("December")
# else
#print("Neither")
print("November") if Month==11 else (print("December") if Month==12 else print("Neither"))
#PrOGrAM EXECUTION STARTS HERE
main()
#SAMPLE OUTPUT