How is a string created?
What does a variable do in Python?
It stores a value by assigning it to a name, which can be used to refer to the value later in the program.
What are floats used for in Python?
Floats are used to represent numbers that aren't integers like fractions or decimals.
What is the output of this code?
>>> 6 + 4 + 10 + 9
The output is 29
What indicates an exponentiation operation?
A double asterisk (**) is used to indicate an exponentiation operation.
When is a backslash used in a string?
When there is a single quote in either a single or double quotation mark.
How can you assign a variable?
An equal sign can be used to assign a variable.
Which of these will be stored as a float?
7
9
1.65
5678
1.65 is stored as a float.
What is used to indicate multiplication in Python?
An asterisk (*) is used to indicate multiplication.
What is the output of this code?
>>> (2 + 6) ** 2
64 is the output of the code.
What is an example of a backslash being used in a string?
>>> 'Carlos\'s mother. He\'s not the teacher. He\'s a very good boy.
'Carlos's mother. He's not the teacher. He's a very good boy.
What are the only characters that are allowed in Python variable names?
They are letters, numbers, and underscores.
What is the output?
>>> 4 + 6 + 9 + 8.0 + 20
47.0 is the output.
What is used to indicate division in Python?
A forward slash (/) is used to indicate division.
What symbol carries out the modulo operator?
The percent symbol (%) is used to carry out the modulo operator.
What does "\n" do in a string?
It makes a new line, basically pressing enter, but instead "\n" is doing it automatically in the string"
What statement can be used to remove a variable?
The statement del can remove a variable.
What happens when there are extra zeros added to the end of a number?
The extra zeros at the end of the number gets ignored.
What is the output of this code?
>>>(4 + 8 + 8) / 2
The output is 10
What is the output of this code?
>>> 7%(5 // 2)
1 is the output of the code.
What is an example of "\n" being used in programming?
>>> """Student: Good morning.
Teacher: Good morning, student. Welcome to Perth Amboy High School."""
'Student: Good morning.\n Teacher: Good morning, student. Welcome to Perth Amboy High School.'
what is the output of this code?
>>> spam = 2
>>> chocolates = 3
>>> del spam
>>> chocolates = 60
>>> spam = 50
>>> print(spam * chocolates)
3,000
What is the output and is this considered a float?
>>> 4 + 5 + 15 + 25 + 30
The output is 79 and it is not considered a float.
What is missing in this code?
>>> (_7 - 2) * 3
-27
The minus sign (-) is missing in the code.
What operators can be used on both floats and integers?
The floor division (//) and modulo (%) are operators that can be used on both floats and integers.