Answer to Question #241850 in Python for Aditya

Question #241850

Given day number D as input, write a program to display the day name


1
Expert's answer
2021-09-25T03:04:00-0400

# Taken day number from user

weekday = int(input("Enter weekday day number (1-7) : "))


if weekday == 1 :

  print("\nMonday");


elif weekday == 2 :

  print("\nTuesday")


elif(weekday == 3) :

  print("\nWednesday")


elif(weekday == 4) :

  print("\nThursday")


elif(weekday == 5) :

  print("\nFriday")


elif(weekday == 6) :

  print("\nSaturday")


elif (weekday == 7) :

  print("\nSunday")


else :

  print("\nPlease enter weekday number between 1-7.")


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