TOP DOWN DESIGN
VARIABLES
USER INPUT
MISC
100

Breaking down (decomposing) your code is splitting it into more functions.

BREAK DOWN (Decompose)

100

symbol or container that holds a value.

Variables

100

A function that prints a prompt and retrieves text from the user.

input()
100

We can ask the user to enter a word, phrase, or number but in order to use a number, we need to convert it to an integer, using the command

int()
200

Breaking a large code up into functions

TOP DOWN DESIGN

200

When we write variable_name = value we are 

Defining a Variable

200

The correct way to ask a user for a color and store the answer as a variable

user_color = input("Give a color: ")

200

variable_name = input(“ “)

Saves user input

300

 is a brief explanation of code in plain English.

Pseudocode

300

Variables must always be _____ before they are used

Defined

300

The correct way to collect a number from the user to use for the radius of a circle?


radius = int(input("What is the radius?: "))

300

variable_name = int()

Changes the type of a value to an integer

400

Breaking your program into smaller parts.

Decomposition

400

The following variable_name = value 

Defining a Variable

400

This cannot be used for variable as it is an existing command

Color

400

 

variable_name = input(“ “) and variable_name = int() 


Commands

500

TOP DOWN DESIGN 

YOUR TEAM HAS EARNED 500 POINTS 

500

Which line of code changes the variable?


1 circle_radius = 50 

2

3 penup() 

4 forward(100) 

5 pendown()

6 circle(circle_radius * 25)

6

500

TRUE OR FALSE: 


We cannot ask the user to enter a word, phrase, or number that we can store in a variable to be used in our program.

FALSE

500
USER INPUT 
LOSE A TURN