Search Header Logo

Python Programming Quiz

Authored by Daniel Bonilla Poveda

Computers

11th Grade

Used 4+ times

Python Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

71 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = 10 y = 5 print(x - y)

A) 5

B) 15

C) 50

D) 10

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a basic data type in Python?

A) List

B) Tuple

C) String

D) Function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'if' statement do in programming?

A) Loops through code

B) Makes decisions based on conditions

C) Initializes variables

D) Defines a function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a for loop in programming?

A) To make decisions based on conditions

B) To repeat a block of code multiple times

C) To define functions

D) To break out of a loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid conditional operator in Python?

A) ==

B) >=

C) <<

D) !=

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression 7 / 3 in Python?

A) 2

B) 2.33

C) 2.5

D) 3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

def

function

method

declare

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

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

Already have an account?