Problem 175468 · easy · Phase 01 Prerequisites & Setup

Is It the Weekend?

conditionals · strings · boolean logic

Write is_weekend(day) that returns True if the given day name is Saturday or Sunday and False otherwise. The comparison must ignore letter case, so "sunday" and "SUNDAY" both count. Anything that is not a full day name (such as "Sat" or an empty string) is not a weekend.

Examples

Input:  day = "Saturday"
Output: True

Input:  day = "Monday"
Output: False

Input:  day = "sunday"
Output: True

Constraints

  • day is a string of at most 20 characters

Goals

  • Compare strings with ==
  • Return a real boolean
  • Ignore letter case when comparing
Starting Python…