How do you know if your code is wrong?
Error
If, is a condition (T or F)
True
What is a loop?
Used in order to repeat a section of code for an amount of time declared by the programmer.
What is a variable?
Something that holds some value
The stars and stripes on our flag stand for what?
50 stars for our states, 13 stripes for the 13 colonies.
How do you start your code
Name, date, title
If the condition is true, then the code will be executed (T/F)
T
Loops stop when a condition evaluates to false (true or false)
True
Is this a valid variable name: 4num (T/F)?
F
Galileo proved that the earth was not the center of our solar system, but _____ is.
The sun.
What is Mr M's puppets name
LB
Why use if else?
executes a block of code, or action,based on whether or not it is true.
What is the range?
range( lower, upper, step)
- Lower -- the beginning value
- upper -- when the program stops
- step -- increment it is going up
What variable name did we use for quarters?
Q
What's the other name for the big dipper?
The drinking gorge.
What is a check to make sure that data is correct called?
Validate
How many conditions will be executed in a code with if else and elif?
One
What is an example of a loop that you do in real life?
We will evaluate
What do index positions start with?
0
The tallest mountain in the world, Mount Everest, is in what mountain chain?
The Himalayan.
Name 5 datatypes for python:
Boolean, int, string, float, long
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
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
What variable returns the number of times a value appears in the string?
Count
Mount Kilimanjaro is in what continent?
Africa