Strings
Variables
Floats
Simple Operations
Other Numerical Operations
100

How is a string created?

By entering a text between two single or double quotation marks.
100

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.  

100

What are floats used for in Python?

Floats are used to represent numbers that aren't integers like fractions or decimals. 

100

What is the output of this code?

>>> 6 + 4 + 10 + 9

The output is 29

100

What indicates an exponentiation operation?   

A double asterisk (**) is used to indicate an exponentiation operation.

200

When is a backslash used in a string?

When there is a single quote in either a single or double quotation mark.

200

How can you assign a variable?

An equal sign can be used to assign a variable. 

200

Which of these will be stored as a float?

7

9

1.65

5678

1.65 is stored as a float.

200

What is used to indicate multiplication in Python?

An asterisk (*) is used to indicate multiplication. 

200

What is the output of this code?

>>> (2 + 6) ** 2

64 is the output of the code.

300

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. 

300

What are the only characters that are allowed in Python variable names?

They are letters, numbers, and underscores. 

300

What is the output?

>>> 4 + 6 + 9 + 8.0 + 20

47.0 is the output.

300

What is used to indicate division in Python?

A forward slash (/) is used to indicate division.  

300

What symbol carries out the modulo operator?

The percent symbol (%) is used to carry out the modulo operator.

400

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"

400

What statement can be used to remove a variable?

The statement del can remove a variable.

400

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. 

400

What is the output of this code?

>>>(4 + 8 + 8) / 2

The output is 10

400

What is the output of this code? 

>>> 7%(5 // 2)

1 is the output of the code.

500

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.'

500

what is  the output of this code?

>>> spam = 2
>>> chocolates = 3
>>> del spam
>>> chocolates = 60
>>> spam = 50
>>> print(spam * chocolates)

3,000

500

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.

500

What is missing in this code?


>>> (_7 - 2) * 3

-27

The minus sign (-) is missing in the code.

500

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. 

M
e
n
u