Python
Conditions
Loops
Variables
Random
100

How do you know if your code is wrong?

Error

100

If, is a condition (T or F) 

True

100

What is a loop?

Used in order to repeat a section of code for an amount of time declared by the programmer.

100

What is a variable? 

Something that holds some value

100

The stars and stripes on our flag stand for what?

50 stars for our states, 13 stripes for the 13 colonies.

200

How do you start your code

Name, date, title

200

If the condition is true, then the code will be executed (T/F)

T

200

Loops stop when a condition evaluates to false (true or false)

True

200

Is this a valid variable name: 4num (T/F)? 

F

200

Galileo proved that the earth was not the center of our solar system, but _____ is.

The sun.

300

What is Mr M's puppets name

LB

300

Why use if else?

executes a block of code, or action,based on whether or not it is true.

300

What is the range?

range( lower, upper, step)

- Lower -- the beginning value

- upper -- when the program stops

- step -- increment it is going up

300

What variable name did we use for quarters?

Q

300

What's the other name for the big dipper?

The drinking gorge.

400

What is a check to make sure that data is correct called?

Validate

400

How many conditions will be executed in a code with if else and elif?

One

400

What is an example of a loop that you do in real life?

We will evaluate

400

What do index positions start with?

0

400

The tallest mountain in the world, Mount Everest, is in what mountain chain?

The Himalayan.

500

Name 5 datatypes for python:

Boolean, int, string, float, long

500

What is it called when the program runs one of two different sections of code based on whether the condition is True or False

Else statement

500

What/where is the error in the code?:

while coin.upper() != "Done"

    coin = input("Insert a coin, Q(Quarter), D(Dime), N(Nickel), or P(Penny). Then type F(Finish) when done. ")

    if coin.upper() == "Q":

        total = total + Q

    elif coin.upper() == "D":

        total = total + D

    elif coin.upper() == "N":

        total = total + N

Missing colon in the while statement

500

What variable returns the number of times a value appears in the string?

Count

500

Mount Kilimanjaro is in what continent?

Africa

M
e
n
u