
Python Programming Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
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
Similar Resources on Wayground
15 questions
Python Quiz

Quiz
•
12th Grade
22 questions
Database

Quiz
•
11th - 12th Grade
20 questions
Skeleton 2024 (Symbol Puzzle) Knowledge Check

Quiz
•
12th Grade
15 questions
Understanding Relational Concepts

Quiz
•
12th Grade
17 questions
Binary Quiz Game

Quiz
•
9th - 12th Grade
18 questions
Relational Database Design

Quiz
•
10th - 12th Grade
18 questions
Data Types - Arrays, Lists and Tuples

Quiz
•
12th Grade
15 questions
MYSQL

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade