Question: Python Booleans: 1. Given two variables, is_empty of type bool, indicating whether a class roster is empty or not, and number_of_credits of type integer, containing
Python Booleans:
1. Given two variables, is_empty of type bool, indicating whether a class roster is empty or not, and number_of_credits of type integer, containing the number of credits for a class, write an expression that evaluates to True if the class roster is not empty and the class is one or three credits.
2. Write a statement that toggles on_off_switch. That is, if on_off_switch is False, it is made equal to True; if on_off_switch is True, it is made equal to False.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
