Understanding Arithmetic in Python 3

Understanding Arithmetic in Python 3

Assessment

Interactive Video

Computers

9th - 10th Grade

Hard

Created by

Jennifer Brown

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the three types of numbers used in Python 3?

ints, floats, and complex numbers

ints, doubles, and complex numbers

floats, doubles, and complex numbers

ints, floats, and doubles

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does Python handle type conversion when adding an int and a float?

Converts both to complex numbers

Keeps both as their original types

Converts the int to a float

Converts the float to an int

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of dividing two whole numbers in Python 3?

An int

A float

A complex number

A string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to obtain the remainder of a division in Python?

The multiplication operator (*)

The double division operator (//)

The modulus operator (%)

The division operator (/)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you attempt to divide by zero in Python?

Python converts the result to a float

Python returns zero

Python throws a zero division error

Python returns infinity