Python Programming Quiz

Python Programming Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Mid Exam

Mid Exam

12th Grade - University

20 Qs

Data Security

Data Security

12th Grade - University

17 Qs

Quiz BÀI 17- các mức ưu tiên của bộ chọn trong CSS

Quiz BÀI 17- các mức ưu tiên của bộ chọn trong CSS

12th Grade

18 Qs

asesmen CP Literasi Digital TP 1 - 6

asesmen CP Literasi Digital TP 1 - 6

12th Grade

20 Qs

Cyber Security Awreness

Cyber Security Awreness

9th - 12th Grade

15 Qs

Tin 9 Bài 8. Hàm SUMIF

Tin 9 Bài 8. Hàm SUMIF

9th Grade - University

10 Qs

ICDL K4_ Xử lý văn bản P1_5*

ICDL K4_ Xử lý văn bản P1_5*

5th Grade - University

16 Qs

PTS Ganjil Grade XII 2024

PTS Ganjil Grade XII 2024

12th Grade

20 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Information Technology (IT)

12th Grade

Practice Problem

Hard

Created by

Manjunatha M

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data types is mutable in Python?

String

Tuple

List

Frozenset

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? def func(x=[]): x.append(1) return x print(func()) print(func())

[1] [1]

[1] [1, 1]

[1, 1] [1, 1]

Syntax Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? x = [1, 2, 3, 4] y = x y.append(5) print(x)

[1, 2, 3, 4]

[1, 2, 3, 4, 5]

[1, 2, 3, 4, 5, 5]

[5]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? print("Hello, World!"[::-1])

"dlroW ,olleH"

"Hello, World!"

Error

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = {1, 2, 3, 4} x.add(4) print(len(x))

3

4

5

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is incorrect about Python dictionaries?

Keys must be unique.

Values must be unique.

Keys must be immutable.

Values can be of any data type.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the lambda keyword in Python define?

A class

A function

A module

A loop

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?