When writing a loop of any kind, what indicates what is inside of the loop?
:
input()
Gets the input from a user
What is this called?
userInput
x = 5
X = 5
How does python indicate a block of code is inside of something else?
Tabs
eval()
Evaluates whatever is inside of the parenthesis
It is important to make all identifiers ______.
Word bank: meaningful, important, expressions, short, long.
X = 5.0
Float
X = 10/2
True or False:
You can use a keyword as a name for a variable?
False
print()
Outputs the arguments to console
When is it important to use ()?
Always
X = True
Boolean
X = "Hel" + "lo"
Is this block of code correct?
userInput == eval(input("Please enter a number"))
No. Two equal signs indicate a comparator, similar to > or <
The start of a for loop
True or False
You should always write a function to hold your code
True
X = "Hello"
String
X = float(10//2 * (4 ** 2))
X = 80.0
What does this mean: %
Modolus, it gives you the remainder of an expression.
if
True or False
You should always use an integer expression in place of a boolean expression.
False
x = [6,2,8,9,10,4]
List
X = bool("Tr" + "ue")
X = True