Python Quiz

Python Quiz

University

10 Qs

quiz-placeholder

Similar activities

Selection Programming_If condition

Selection Programming_If condition

8th Grade - University

15 Qs

Refresh Python

Refresh Python

University

10 Qs

Quiz 2

Quiz 2

University

10 Qs

Python Programming Quiz

Python Programming Quiz

University

13 Qs

Python Basics Quiz

Python Basics Quiz

8th Grade - University

10 Qs

KLS8 IT

KLS8 IT

8th Grade - University

10 Qs

Mastering Python Loops, Functions, and Lists

Mastering Python Loops, Functions, and Lists

University

8 Qs

Dasar Python

Dasar Python

University

13 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Raymond Radebe

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to initialize a list in Python?

list = [1, 2, 3]

list = (1, 2, 3)

list = {1, 2, 3}

list = 1, 2, 3

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code:

print(type(3/2))?

<class 'int'>

<class 'float'>

<class 'str'>

<class 'complex'>

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

func

function

define

def

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to add an item to a list in Python?

add()

insert()

append()

push()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(2 ** 3)?

6

8

9

12

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following functions converts an object to a string in Python?

str()

int()

chr()

repr()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of print(4 // 2)?

2.0

2

4.0

4

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?