Note 5.25.1.
If you work in a group, have only one member of the group fill in the answers on this page. You will be able to share your answers with the group at the bottom of the page.
check_guess
which will return 'too low'
if the guess is less than the passed target, 'correct'
if they are equal, and 'too high'
if the guess is greater than the passed target. For example, check_guess(5,7)
returns 'too low'
, check_guess(7,7)
returns 'correct'
, and check_guess(9,7)
returns 'too high'
. There are three extra blocks that are not needed in a correct solution.last_half(str)
which returns the last half of the characters from the passed string str
. If str
has less than 2 characters then return the empty string ""
. For example, last_half("a")
returns ""
, last_half("coal")
returns "al"
, and last_half("bye") returns ``ye
.and
, or
, and not
. These can be used to create complex conditionals.have_ride
is true or can_walk
is true?is_raining
is false? Pick all that are correct.squirrel_play
that takes a temp
(the temperature) and Boolean is_summer
that indicates if it is summer or not and returns True
if it is summer and the temperature is between 60 and 100 (inclusive). It also returns True
if it isn't summer and the temperature is between 60 and 90 (inclusive). Otherwise, it returns False
.https://cspogil.org/Home