How do you format a print statement?
print ("text")
How do you format a comment?
#type anything here : )
What does string concatenation mean?
The combination or addition of two strings.
Tell me what an USB is?
1) A secondary memory
2) An input
Explain the logic behind how a user input variable works.
The user is asked the prompt, the input is then saved in the variable.
How do you format a while-loop?
while condition:
Statement
Statement
What is the error?
_greeting1 = "HI, THERE"
print (_greeting1)
There is no error.
What is a function?
A body of prewritten code that performs the same operation once called.
What is the default value of a range function in a for-loop when no beginning value is given?
0
What is something that you must always include in a while loop?
A loop-breaking condition/statement.
How do you format a nested if-statement?
if condition:
if condition:
Statements
else:
Statements
else:
Statements
Do you really want to reveal the question?
Yes: You get the question.
No: You get a free 100 points
Brave.
You get 400 points
What is a condition-controlled loop?
A loop that uses True or False boolean values to control the number of times that it repeats.
The five main components of a computer
1) input
2) output
3) CPU
4) Main Memory
5) Secondary memory
What does the break statement do?
It breaks a loop. This makes it so that the loop stops iterating altogether.
How do you format an elif statement?
if condition:
Statements
elif condition:
Statements
elif condition:
Statements
elif condition:
Statements
else:
Statements
What is the error?
name = Jhonny
print("Hi there", \t, name)
The escape characters go inside the string literals.
What is an Iteration?
A single execution of the body of the loop.
The five rules for variables / variable naming
1) cannot be a keyword
2) Cannot contain spaces
3) 1st character cannot be a number
4) Can only have letters, numbers, and underscores.
5) Variables are case-sensitive.
What does a continue statement do?
It breaks the current iteration. This makes it so that the current iteration in the loop stops and the next one begins.
This is regardless of the position of the program in the iteration.
How do you format a for-loop with a range?
for variable in range (Val):
Statement
Statement
How do you format the statement that checks the datatypes of a variable?
print(type(variable))
What is a separation character?
A visible character that appears as a separation of two or more items in a print statement.
In a for-loop range function, what do the first, second, and third arguments represent?
First argument = Beginning
Second argument = End (not including)
Third argument = Step
You are brave.
Choose one. Answer the question for 1000 or retreat and receive 100 points.
Question: What does the % operator do?
It divides one number by another and returns the remainder. *NOT THE RESULT*