Syntax
Conditionals
Loops
Colors
MISC
100

what is wrong with this code?

print("hello world')

mismatched quotation marks

100
what is wrong with this code

if x = 10:

   print("x is 10")

elif x < 10:

   print("less than 10")

else:

   print("greater than 10")

no double equal

100

write a for loop that counts from 1 to 10 by 3s.

for i in range(1,11,3):

    print(i)

100

Write a print function that says "Hello" in a bright color

Multiple correct answers.
Have coaches verify

100

What imports have we learned this week?

import random

import turtle

200

When do I need to indent a line of code?

After a colon when we are trying to represent that a piece of code is inside another piece of code

200

How many elifs can I have after 1 if statement?

as many as you want

200

what is the difference between a for loop and a while loop?

For loop is used when the number of iterations is already known. While loop is used when the number of iterations is unknown. (Other answers are acceptable as well)

200

If \033[31m is red,

What is \033[91m

bright red

200

Write the code to draw an L in turtle

Multiple correct answers.

Have coaches verify.

300

what is wrong with this code? Name 3 things

num = 3

if num != 5

print("not equal!")

   else:

      print("equal!")


no colon after if, no indentation of print("not equal!") and the else is indented under the if

300

Do I always have to have an else statement after an if/elif statement?

No

300

What is the output of this loop?

i=10

while 7 * 3 >= 21:

   print(i)

   i-=1

infinite loop

300

Which of these are not ANSI colors? (There are 2)
Red, Orange, Green, Yellow, Blue, Magenta, Violet, Cyan, Black, White

Orange & Violet

300

Name 4 projects you have completed this week in camp

Acceptable Answers:
Choose your own adventure, calculator, number guesser, rock paper scissors, turtle names.

400

what is the error in this code and how would i fix it?

num = int(input("enter a number: "))

print(num + " is the number you chose!")

cannot concatenate ints and strings must use str() around num to use plus sign with it

400

list 6 Python operators (partial credit is possible)

<, <=, >, >=, ==, !=

400

output?

x = 50

while x > 5:

    print(x)

    x /= 2

50

25.0

12.5

6.25

400

What is the output?

RED = "\033[31m"

BLUE = "\033[34m"

BRIGHT_MAGENTA = "\033[95m"


print(RED + "He" + BRIGHT_MAGENTA + "ll" + BLUE + "o!")

"Hello!" with:

"He" being red

"ll" being bright magenta

"o!" being blue

400

What will this draw?


for I in range(4):

    t.right(90)

    t.forward(80)

A square

500

Name all 7 problems

def max(a, b)

   If a > b:

       print("a is greater!'}

   else a < b

   print("b is greater")

no colon after def, mismatched quotations, mismatched brackets, no condition for else, no colon after else, print is not under else, no function call

500

write a program using conditionals that checks if a number is even.

num = int(input("enter a num: "))

if num % 2 == 0:

    print("even")

else:

    print("odd")

500

What is the output?

food = ["apple","grape","cookie","bread"]

for i in range(0,4):

   print(food[i] + ",")

apple,

grape,

cookie,

bread,

500

Which of these will print out "Hello" in red text.

(A) print("\033[31mHello")

(B) print("\033[31m" + "Hello")

(C) print("\034[31mHello")

(D) print("\033[31m")

      print("Hello")

(E) print("\033(31mHello")

A, B, and D

500

Why won't this code work?

num = input("Enter a number to add to 3: ")

sum = num + 3

print(sum)

num() is a string and cannot be used in a math operation