1) Write a python program using if-elif statement to print
the weekdays.
Sample input:I output : SUNDAY
Answers
Answered by
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
Biology,
4 months ago
Business Studies,
4 months ago
Physics,
10 months ago
Biology,
10 months ago
Computer Science,
1 year ago
English,
1 year ago
English,
1 year ago