Computer Science, asked by andanarjuna8658, 10 hours ago

Write a program in pyrhon a user to enter a day of the week.if the entered day of the week is between 1 to 7 than display the respective name of the day using if- else-if statements

Answers

Answered by samarthkrv
0

Answer:

day = int(input("Enter the day of the week:"))

if(day == 1):

   print("The day is Monday")

elif(day == 2):

   print("The day is Tuesday")

elif(day == 3):

   print("The day is Wednesday")

elif(day == 4):

   print("The day is Thursday")

elif(day == 5):

   print("The day is Friday")

elif(day == 6):

   print("The day is Saturday")

elif(day == 7):

   print("The day is Sunday")

else:

   print("Enter a number between 1 and 7")

Explanation:

Similar questions