Python Quiz 1 : Variable, Data Types, Slicing

Python Quiz 1 : Variable, Data Types, Slicing

University

15 Qs

quiz-placeholder

Similar activities

Test Python

Test Python

8th Grade - University

15 Qs

CodeHS - Intro to Python - Basics and Console Interaction

CodeHS - Intro to Python - Basics and Console Interaction

9th Grade - Professional Development

20 Qs

Chapter 1 Python

Chapter 1 Python

8th Grade - University

12 Qs

Basic Python

Basic Python

University

20 Qs

IntraSympo Round One

IntraSympo Round One

University

20 Qs

Season 1 #Spaic Python Weekly Quiz

Season 1 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

BPP UNIT-1,2 AID

BPP UNIT-1,2 AID

University

20 Qs

Python Quiz 1 : Variable, Data Types, Slicing

Python Quiz 1 : Variable, Data Types, Slicing

Assessment

Quiz

Computers

University

Medium

Created by

Kundan Kumar

Used 3+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?