''' Purpose: gain experience with if-elif-else ''' # report message based on day of week # Sunday: weekend day # Monday: start of school week # Tuesday: school day # Wednesday: school day # Thursday: school day # Friday: end of school week # Saturday: weekend day # get day of interest reply = input( 'Enter day of week: ' ) # put day in standard format - first letter capitalized, others lower case day = reply.strip() day = day.capitalize() # day = reply.strip().capitalize() # alternatively could also be written as print( ) # analyze and report on day # There are several ways to do this as long as you account for the # right conditions and outputs in the if, elif, and else statements! ''' Shorter way to do the same code: if ( day == "Monday" ): print( "start of school week" ) elif ( day == "Tuesday" or day == "Tuesday" or day == "Tuesday" ): print( "school day" ) elif ( day == "Friday" ): print( "end of school week" ) else: print( "weekend day" ) Note you could also do any combination with the repeated results like weekday or weekendday and put those in an else statement or something along those lines to account for all cases. Remember, generally else is used for a big category that satisfies the most nonspecific conditions. ''' # Way to test all possible cases using if/elif/else if ( day == "Monday" ): print( "start of school week" ) elif ( day == "Tuesday"): print( "school day" ) elif (day == "Wednesday" ): print("school day") elif (day == "Thursday" ): print( "school day") elif (day == "Friday" ): print( "end of school week" ) else: # Saturday or Sunday print( "weekend day" )