Tracy Commands
Karel Commands
Errors
Binary and Decimal
Grab Bag
(2x points)
100
Name a command that is equivalent to right(90)

left(270)

100

How many total times does Karel place a ball? 

6

100

What type of error is caused by a misspelled key word? 

syntax error

100
How many binary digits are in the decimal number 4

3

100

What three things are required in the comment in front of every function definition. 

Description, Precondition, Postcondition

200

What shape will this function draw? 

circle(50,360,5)


Pentagon

200

Defining a turn_right() function as three consecutive left turns is an example of which concept? Hint: This concept describes the amount of detail in a given statement.

Decomposition

NOT Abstraction!

200

What type of error might this code cause? 

Infinite Loop

200

How many unique values can be represented with 7 binary digits? 

128

200

What is the word we use to describe inputs to a function?

Parameter

300

This code is designed to draw a triangle. Identify and fix the logic error


Line 5 should be right(120), not right(60)

300

How many spaces forward from the original spot does Karel end after this code? 

3

300

This code is designed to paint the entire row red. Describe what happens when it is run. 



The first square is not painted. 

300

Which number is greater? 

10002 or 910

910. The other number is equivalent to 810

300

What was Python named after? 

It's not the snake! It's actually Monty Python, the British comedy series

400

How many lines will be drawn on the screen when this code finishes running?

0

400

What direction will Karel face after this code is run? 

East

400

Is a syntax error considered a Compile Time error or a Run Time error? 

Compile Time - It happens when the code is compiling, before it starts running. 

400

Convert the following number to decimal. Mental math only!

000110102

000110102 = 2610

400

What year was python first introduced? (within 2 years earns half credit)

1991 - The same year Mr. Elman was born

M
e
n
u