Search Header Logo

Python Basics-Quiz-I

Authored by kris hna

Engineering

University

Python Basics-Quiz-I
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(2 ** 3)?

5
6
8
9

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

1variable
variable_1
variable-1
variable 1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of len([1, 2, 3])?

2
3
4
Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

function
define
def
fun

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'break' statement do in Python?

Skips the current iteration
Ends the current loop
Restarts the loop
Does nothing

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(type(5))?

<class 'str'>
<class 'int'>
<class 'float'>
<class 'bool'>

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

tuple
str
list
int

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?