Search Header Logo

Python Programming Quiz

Authored by EC M

Other

University

Python Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct variable name according to Python naming conventions?

1variable

variable_name

VariableName

variable-name

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the recommended indentation level in Python according to PEP8?

2 spaces

4 spaces

8 spaces

Tabs

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int

float

list

char

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type would you use to store a sequence of characters in Python?

int

float

str

bool

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: type(3.14)?

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

tuple

list

str

int

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to write a comment in Python?

// This is a comment

/* This is a comment */

# This is a comment

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?