Python Programming Quiz

Python Programming Quiz

12th Grade

18 Qs

quiz-placeholder

Similar activities

Database&Relation

Database&Relation

12th Grade

20 Qs

UAS Desain Media Interaktif

UAS Desain Media Interaktif

12th Grade

15 Qs

User Interface Design - Topic 1

User Interface Design - Topic 1

12th Grade

15 Qs

Đề ôn tập cuối HKI lớp 5

Đề ôn tập cuối HKI lớp 5

6th Grade - University

17 Qs

Оформлення текстових документів

Оформлення текстових документів

12th Grade

14 Qs

3rd week g9 summative

3rd week g9 summative

7th - 12th Grade

15 Qs

TEST1.PY

TEST1.PY

10th Grade - University

20 Qs

Tin 12_Trắc nghiệm_Bai2

Tin 12_Trắc nghiệm_Bai2

12th Grade

15 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

ALI HANI JIWANI

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? name = "Python" print(name[1:4])

"yth"

"Pyt"

"tho"

"ytho"

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which operator is used to concatenate two strings in Python?

*

+

%

&

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does len() function return when used on a string?

The number of vowels in the string

The length of the string (number of characters)

The number of words in the string

The memory size of the string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you use an f-string to format the variable name into the sentence "Hello, [name]"?

"Hello, {name}"

f"Hello, {name}"

"Hello, + name"

Hello.format(name)

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the result of str.find("apple") if the string does not contain "apple"?

It raises an error

It returns -1

It returns 0

It returns None

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the output of round(3.14159, 2)?

3

3.14

3.142

3.1

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does math.factorial(5) return?

25

15

120

720

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?