What is Python?
A coding language
What is a string?
A sequence of characters that represent text.
What are the two types of loops?
While loops and for loops
What is a list?
An ordered collection of elements.
What is an elif statement?
Used when the first if statement isn't true, but you want to check for another condition.
What is a coding language?
A language computers understand.
What is the difference between an integer and a float?
A float has a decimal while an integer does not.
What do the following lines of code do?
fruits = ["hi", "8", "hello"]
for x in fruits:
print(x)
They print:
hi
8
hello
What is the first position in a list?
0
What do the following lines of code do?
x = 3
y = 10
if x < y:
print("x is smaller than y.")
Prints a sentence if x is smaller than y.
What platform did we use for learning Python?
Replit
What is a variable?
A label you can assign to a line of code.
What does a while loop do?
Executes a set of statements as long as a condition is true.
Can lists be modified midway? Can we add or remove elements?
Yes, lists can be modified.
Which 2 statements (if, elif, else) are used only once?
If and Else.