Python Practice › Loop Programs › Program 74

Days of the week except Sunday

EasyLoop Programs · 74 of 90

Write a Python program to print the days of the week except Sunday using a while loop.

Advertisement
Output
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

Approach

  1. Walk through a list with an index and skip “Sunday”.

Solution

Python
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]i = 0while i < len(days):    if days[i] != "Sunday":        print(days[i])    i += 1
Output
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

Learn the concept

New to this topic? Read the lesson, then come back.

More loop programs

← All 90 Loop Programs

Leave a Comment