Basic Commands
User Input
For Loops
Functions
Python
100

How would I tell my arrow to move forward 100 pixels?

forward(100)

100

How would I ask for a word from the user?

word = input("Enter a word: ")

100

Can your computer count to a million using a for loop?

Yes

100

What is one purpose of a function?

To make code readable

To reuse code

To organize code

100
What is the environment that we are coding on called?

IDLE

200

If I want to make one full rotation to the left or right, how many degrees should I turn?

360

200

How may I ask the user for a number?

number = int(input("Enter a number: "))


200

Write me a for loop that moves forward 50 10 times...

for _ in range(10):

     forward(50)

200

Write the first line that you need to write to define a function. Use the name draw()

def draw():
200

What are the four words that we need at the top of our program?

from turtle import *

300

What two commands do we need to draw a square?

forward

left/right

300

for _ in range(8):

     col = input("Color: ")


How many colors does this ask for?

8

300

Draw me a triangle using a for loop...

for _ in range(3):

    forward(100)

    left(120)

300

Why do we need to indent inside functions?

So the computer knows what lines are inside and outside of our function.

300

Python is a programming language. Name another programming language.

HTML/Swift/CSS/Java/C+/C#

400

Explain the process for centering our drawing...

- Find height and width

- Divide both by 2

- Check if negative/positive based on where you would like to start

400

number = int(input("Enter a length: "))

for _ in range(10):

     forward(number)


How many pixels does this program move forward when number is 67?

670

400

How many for-loops can I put inside a for-loop?

Unlimited.

400

Write me a function that takes a user color and changes the color to that user color. Call the function choose_and_change_color()

def choose_and_change_color():

      c = input("Which color: ")

      color(c)

400

Name one invention that you use that was coded using Python

Youtube

Facebook

Instagram

500
I have a line that I do not want in my drawing, how would I fix it?

Wrap the statement in penup() and pendown() commands.

500

Write me code that draws a user-inputed number-sided polygon...

x = int(input("Enter a number: "))

for _ in range(x):

     forward(67)

     left(360/x)

500

How would I write a double for loop so I can draw 5 squares in a line?

for _ in range(5):

    for _ in range(4):

         forward(100)

         left(90)

    forward(100)

500

Write me a function that draws the Italian flag.

draw it using IDLE and show it to me

500

Write me a program that draws me a chessboard with alternating colors...

show me

M
e
n
u