Code Blocks
Debug The Code
The Painter
Vocab Definitions
Who Likes Coding Anyway?
100

color = "purple"

Answer: What is a variable?

100
first name = "Ava"


What needs corrected? Which rule is being broken?


Answer: first name needs an underscore between them. What is snake_case naming?

100

This code is used for repeating actions of the Painter object, such as 

           bob.move ( )

           bob.move ( )

           bob.move ( )

           bob.move ( )

Answer: What is a while loop.

100

Involves breaking down a problem into smaller, more manageable parts.

Answer: What is decomposition?

100

This is an action that an object can do.


Answer: What is a method?

200
name = "Sara"

What is the data type of this data value?

Answer: What is a string data?

200

 # Create a painter

       matt.painter


What are the 2 code errors?

Answer: What are Painter must be capitalized and it is missing parenthesis at the end. 

200
These are the 3 actions you tell a Painter object to take when you want them to turn right.

Answer: What is 

painter.turn_left( )

painter.turn_left( )

painter.turn_left( )

200

A problem-solving approach that involves breaking problems down into smaller parts, recognizing patterns, focusing on important details, and creating step-by-step solutions that a computer or person can follow.

Answer: What is Computational Thinking?

200

This is a character that has attributes (what it knows) and methods (what it can do).

Answer: What is an object?

300
age = 14

What is the data type of 14?

Answer: What is an integer?

300

What 2 errors are present in the code below?

def secret_message( )

print("You're the best!)

Answer: The function is missing a colon : and the method must be indented [TAB].

300

Why won't the Painter object paint 4 spaces with the code below?

bob.move ( )

bob.take_paint( )

bob.paint("blue")

Answer: What is Bob the painter is only told to move, pick up paint, and paint 1 space. 

300

This is the process of focusing on the important information and ignoring irrelevant details.

Answer: What is abstraction?
300

This is a way to plan out your code using plain language. Programmers use this to think through their ideas before writing real code.


Answer: What is pseudocode?

400
is_ready = True

What is the data type of True?

Answer: What is a boolean data?

400

def turn_and_move( )

     sue.turn_left( )

     sally.move( )

Name the 2 errors in the code block above.

What type of code block is this?

Answer: Errors - What are a missing colon : and sue should be the name in both methods. 

Type of code block: Function

400

How could you modify the code below to have Bob paint 4 spaces using a while loop?

bob.move ( )

bob.take_paint( )

bob.paint("blue")

Answer: What is

while bob.can_move( ):

         bob.move ( )

         bob.take_paint( )

         bob.paint("blue")

400

A set of instructions to accomplish a task. 

and 

The popular programming language we have been practicing.

Answer: What are an algorithm and Python?

400

The actual data value you put into a function when you call or use it.

Answer: What is the argument?

500

while bob.can_move( ):

    bob.move( )

    bob.paint ( )

What is the type of code block used here?

Answer: What is a while loop?

500

if fred.can_move( )

    fred.move(“north”)

else:    

    fred_paint(“green”)

What are the 2 errors & what type of code block is this?

Answer: What are missing a colon : and the underscore in the second method should be a period.

Type of code block: What is and if / else statement or a two-way selection statement

500

How could you modify the code below to have Bob paint 1 space when he can move and turn left when he cannot move?

bob.move ( )

bob.take_paint( )

bob.paint("blue")

Answer: what is 

if bob.can_move( ):

         bob.take_paint( )

         bob.paint("blue")

else: 

         bob.turn_left ( )


500

These act as placeholders for the values (or arguments) that will be put into the function when it is called or used.



Answer: What are parameters?
500

A .py file that contains Python code and can be used to save created functions for other projects.

Answer: What is a module?

M
e
n
u