Computer Science, asked by Lakshayaangel, 10 months ago

1) Write a python program using if-elif statement to print
the weekdays.
Sample input:I output : SUNDAY​

Answers

Answered by Shrideepthi
4

Answer:

# 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.")

Explanation:

hope it may helps you....

Similar questions