Python Arithmetic in Version 2

Python Arithmetic in Version 2

Assessment

Interactive Video

Computers

9th - 10th Grade

Practice Problem

Hard

Created by

Jennifer Brown

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary focus of this video tutorial?

Arithmetic in Python version 3

Object-oriented programming in Python

Data structures in Python

Arithmetic in Python version 2

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a type of number in Python version 2?

Long

Int

Complex

Double

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you convert an int to a long in Python version 2?

By adding zero j at the end

By using the float constructor

By adding an L at the end

By adding a 0 at the end

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you try to convert a float to a long?

The float is directly converted to a long

The float is converted to a complex number

The float is rounded and then converted to a long

A type error is raised

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When adding an int and a long, what does Python do?

Converts the int to a long

Raises a type error

Converts the long to an int

Converts both to floats

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of multiplying an int and a float in Python?

An int

A complex number

A long

A float

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of dividing a float by a complex number?

A long

A complex number

A float

An int

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?