Search Header Logo

Python Quiz 1 : Variable, Data Types, Slicing

Authored by Kundan Kumar

Computers

University

Used 4+ times

Python Quiz 1 : Variable, Data Types, Slicing
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid Python variable name?

2value

_value

value-name

value name

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the type of the result of 3 / 2 in Python 3?

int

float

complex

double

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will "Python" * 2 produce?

['Python', 'Python']

"Python2"

"PythonPython"

Error

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does the following code return?

dep

depen

depend

depende

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Negative Indexing: If s = "Freedom", what is s [-2]?

r

e

o

m

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does this produce?

"abc"

"ace"

"bdf"

"fed"

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the result of:

True

False

Depends on Python version

Error

Answer explanation

True, because integers between -5 and 256 are interned

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?