Search Header Logo

Python Programming Quiz

Authored by Civil Department

Computers

University

Used 11+ times

Python Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of programming language is Python?

Interpreted

Compiled

Machine

Low-level

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a type of control structure in Python?

Repetition

Sequential

Iteration

Selection

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'if-else' statement in Python?

To repeat a block of code

To import libraries

To execute code based on a condition

To define a function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: 'print("HELLO WORLD!")'?

HELLO WORLD!

HELLO WORLD

Hello World!

hello world!

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement correctly checks if a number is even?

if num % 2 != 0:

if num % 2 = 0:

if num % 2 == 0:

if num / 2 == 0:

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'input' function do in Python?

Defines a variable

Imports a module

Reads data from the user

Outputs data to the console

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'print' statement in Python?

To display output to the console

To read user input

To define a function

To create a loop

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?