Python Quiz

Python Quiz

Professional Development

27 Qs

quiz-placeholder

Similar activities

Julia -  Quiz 1

Julia - Quiz 1

Professional Development

24 Qs

Salesforce Daily Quiz

Salesforce Daily Quiz

Professional Development

24 Qs

Descomplica - AWS CloudTrail & Config

Descomplica - AWS CloudTrail & Config

Professional Development

22 Qs

programming 8.2 and 8.3

programming 8.2 and 8.3

Professional Development

22 Qs

Java sve

Java sve

Professional Development

22 Qs

Тестування з теми: "Штучний інтелект"

Тестування з теми: "Штучний інтелект"

Professional Development

24 Qs

Sonic the Hedgehog Quizizz

Sonic the Hedgehog Quizizz

KG - Professional Development

23 Qs

ReactJS Online Test

ReactJS Online Test

Professional Development

25 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

Vandana Vandana

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

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

27 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? x = 5 y = "Hello" z = 3.0 print(type(x), type(y), type(z))

<class 'int'> <class 'string'> <class 'float'>

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

<class 'int'> <class 'string'> <class 'complex'>

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

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax to declare a function in Python?

def function_name:

def function_name[]:

def function_name():

define function_name():

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of the following operation? result = 7 // 2 print(result)

3.5

3

4

2.5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

_myvar

my_var2

2varname

myVar

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? my_list = [1, 2, 3, 4, 5] my_list.append([6, 7]) print(my_list)

[1, 2, 3, 4, 5, 6, 7]

[1, 2, 3, 4, 5, [6, 7]]

[1, 2, 3, 4, 5, 6, [7]]

[1, 2, 3, 4, 5, 6, 7, [8]]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? my_list = [10, 20, 30, 40, 50] print(my_list[1:4])

[20, 30, 40]

[10, 20, 30, 40]

[30, 40, 50]

[20, 30, 40, 50]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to add multiple elements to a list in Python?

append()

extend()

insert()

add()

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?