Python Programming Quiz

Python Programming Quiz

12th Grade

18 Qs

quiz-placeholder

Similar activities

vl Mastering Python Concepts

vl Mastering Python Concepts

12th Grade

20 Qs

SEB-72 Week 10 Python and Django (Little bit of SQL) Quiz

SEB-72 Week 10 Python and Django (Little bit of SQL) Quiz

9th - 12th Grade

14 Qs

Lecture 2 Quiz

Lecture 2 Quiz

12th Grade

14 Qs

Python and Computer Science Quiz

Python and Computer Science Quiz

12th Grade

15 Qs

Arrays, tuples and records

Arrays, tuples and records

9th - 12th Grade

23 Qs

[AP CSP] Binary Number System

[AP CSP] Binary Number System

9th - 12th Grade

18 Qs

Python Review 2

Python Review 2

11th - 12th Grade

21 Qs

RDBMS - 1

RDBMS - 1

12th Grade

15 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

ALI HANI JIWANI

Used 1+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?