What is Python an example of?
Formal language
Who invented the first mechanical computer?
Charles Babbage
Function is "a named group of ____ that is designed to do a specific task".
Code
Why do you use loops?
To repeat the function.
True or False
"print" can only be used on output words.
False
What is the symbol for integer division?
//
What structure is used to determine if a condition is true or false?
If statement
Count variable counts how many times the loop runs or iterates.
T/F
True
Main memory is what?
Symbols that store values are called what?
Variables
What does this symbol means?
!=
Not equal to
range(start, ___, step)
Stop
print(5+9*2)
23
What variable name is the best to hold the area of a rectangle?
area
When do you use 'else statement'?
When none of the other expressions were true.
What does for loop use to set the value of the loop control variable?
It uses the range function.
What is the error?
input("enter a word:")
print(w)
The input needs to be stored to a variable, w.
What is the output?
x=-2
y=-3
print(x*y+2)
8
x = int(input("Enter a number: "))
if x != 7:
print("A")
if x == 7:
print("B")
You typed in 7. What should be the output?
B
What are the valid ways to end a loop?
- Checking when a variable reaches a certain value
- Using user input