What does this code print out?
is_sunny = True
print(not is_sunny)
False
What is the difference between the operators <= and <?
<= will return true if the LHS is less than OR equal to the RHS, but < will only return true if the LHS is strictly less than the RHS
Write one line that creates a screen turtle
<screen name> = turtle.Screen()
What does this code print out?
x = 5
y = 0
print(x < 6 and y > 0)
False
What is the difference between these two operators: == and =
== checks if the RHS and LHS are equal (compares), while the = sets the value of a variable. BONUS: what is another name for =?
Write one line that sets the pen size of a turtle, named Bob, to 8.
bob.pensize(8)
What does this code print out?
“No rain today”
“No rain today”
“No rain today”
“It is raining today”
When do the AND, OR, and NOT operators return True? (1 answer per operator)
AND- returns True if BOTH the RHS and LHS are True
OR- returns True if AT LEAST ONE of the RHS OR the LHS is True
NOT- returns True when put in front of a False value
Write THREE lines that will draw a square. (Assume a turtle named tim already exists in the program)