Formatting [EASY]
Formatting [HARD]
Turtle Graphics
Arithmetic
100

print("Hello", "World", "CS303E")

What is 'Hello World CS303E'? (ignore the single quotes)

100

t = Template('Hey, $name!')
t.substitute(name="BOB")

What is Hey, BOB?

100

The output of:

import turtle

screen = turtle.Screen()

turtle.right(90)

turtle.forward(100)





What is [empty screen]? (nothing is drawn!)

100

print(36 / 4)

What is 9.0?

200

print("Hello" + "World" , " CS303E")

What is 'HelloWorld_ _CS303E' (ignore the quotes)

200

a = 2
b = 3
f'Five plus ten is {a + b} and not {2 * (a + b)}.'

What is Five plus ten is 5 not 10?

200

Type the fixed line of code in chat

What is import.turtle?

200

x=5

y="5"

print(x==y)

What is False?

300

cheese = "Cheese"

'Hello, {}'.format(cheese)

What is Hello, Cheese?

300
errno = 15
name = "Bob"
templ_string = 'Hey $bar, there is a $foo error!'
Template(templ_string).substitute(foo=name, bar=errno)

What is Hey 15, there is a Bob error!?

300


What is turtle.forward(150)?

300

print(-18 // 4)

What is -5?

400

strOne = str("boo")
strTwo = "boo"
print(strOne == strTwo)

What is True?

400

def greet(name, question):
...     return f"Hello, {name}! How's it {question}?"

greet('Bob', 'going')

What is Hello, Bob! How's it going?

400

Type the corrected version of the mistake in chat (sorry for losing the Jeopardy format!)

screen.bgcolor("lightblue")


400
Rank in order of precedence (highest to lowest):


or, **, (), not, +

What is (), **, + not, or?

500

Statement with output '          10' (there are 10 spaces)

What is print("10".rjust(10))?

500

This many of the following are valid strings:

X = “we’re okay”
Y = “12”
Z = ‘we’re okay’
A = '12'
B = hey
C = ‘Unhand me”

What is 3?

500

Output of:

t.pendown()
t.forward (50)
t.backward (50/2)
t.right (90)
t.forward (100)
t.left(90)
t.penup()

Assume code is syntactically correct

What is T?

500

print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))

What is False True True True?

M
e
n
u