python Quiz

python Quiz

University

7 Qs

quiz-placeholder

Similar activities

INFYTQ-Python-Quiz1-15/3/2021

INFYTQ-Python-Quiz1-15/3/2021

University

10 Qs

Python String Slicing

Python String Slicing

University

8 Qs

C Language

C Language

10th Grade - University

11 Qs

Fungsi Input dan Output Python

Fungsi Input dan Output Python

2nd Grade - University

10 Qs

Java Quiz 1

Java Quiz 1

University

10 Qs

Mastering Python Basics

Mastering Python Basics

University

8 Qs

C# with Trung Giang - C2 - 2

C# with Trung Giang - C2 - 2

University

10 Qs

PF Unit  10

PF Unit 10

9th Grade - University

10 Qs

python Quiz

python Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Usha Chennai

Used 18+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code

print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))

False True True True

False True False True

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of print(type([]) is list)

False

True

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following variable assignment

x = 75

def myfunc():

x = x + 1

print(x)


myfunc()

print(x)

Error

1

76

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Select the right way to create a string literal Ault'Kelly

str1 = ‘Ault\\’Kelly’

str1 = ‘Ault\’Kelly’

str1 = “””Ault’Kelly”””

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of print(type({}) is set)

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the data type of the following

aTuple = (1, 'Jhon', 1+3j)

print(type(aTuple[2:3]))

list

complex

tuple

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python 3, what is the type of type(range(5))


int

list

range