Python Programming Quiz

Python Programming Quiz

University

40 Qs

quiz-placeholder

Similar activities

Integrated Application Software Prefinals

Integrated Application Software Prefinals

12th Grade - University

41 Qs

Latihan Soal Materi Informatika kelas 8 smt 1

Latihan Soal Materi Informatika kelas 8 smt 1

8th Grade - University

40 Qs

Tin học

Tin học

12th Grade - University

35 Qs

Kuis 1 DTD - TPB 55 2025/2026

Kuis 1 DTD - TPB 55 2025/2026

University

42 Qs

Основы PYTHON

Основы PYTHON

11th Grade - University

35 Qs

Ms. Excel

Ms. Excel

10th Grade - University

35 Qs

Assessment Tengah Semester Ganjil

Assessment Tengah Semester Ganjil

8th Grade - University

35 Qs

Quiz Pra Asas 24 - Ganjil

Quiz Pra Asas 24 - Ganjil

7th Grade - University

45 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Abhishek Swami

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

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

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet? x = 5 if x > 3: print("A") else: print("B")

B

A

Error

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct syntax for an if statement in Python?

if x > y then:

if (x > y)

if x > y:

if x > y {

3.

OPEN ENDED QUESTION

3 mins • 1 pt

x = 10 y = 20 if x > y: print("X is greater") else: print("Y is greater")

Evaluate responses using AI:

OFF

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct code to complete the following program: x = 15 if x % 2 == 0: print("Even") else: __________

print("Odd")

print("Even")

print("None")

print(x)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is used to exit a loop?

exit

break

continue

stop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure is commonly used to mimic a switch statement in Python?

List

Dictionary

Tuple

Set

7.

OPEN ENDED QUESTION

3 mins • 1 pt

def switch_demo(x): switcher = { 1: "One", 2: "Two", 3: "Three" } return switcher.get(x, "Invalid") print(switch_demo(2))

Evaluate responses using AI:

OFF

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?