Problem 175468 · easy · Level 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. Only the case is ignored: anything else that is not exactly a full day name (such as "Sat", "Sunday " with a trailing space, 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…