
Python Basics Quiz
Authored by Hanaa Al-Ostad
Computers
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the function used to take user input in Python?
read_input()
user_input()
get_input()
input()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in Python?
myVariable
my variable
myVariable123
my_variable
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 'Hello' print(x[1:3])
el
He
el
lo
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add an element to the end of a list in Python?
insert()
append()
extend()
remove()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression? 5 + 3 * 2
11
16
10
7
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 5 y = 2 print(x % y)
2
0
3
1
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following is a valid string in Python?
c) "Hello"
d) Hello
a) 'Hello'
b) Hello
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?