Python Quiz
Quiz
•
Computers
•
Professional Development
•
Hard
Vandana Vandana
Used 6+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
24 questions
CompTIA A+ 1001 Set #2 (short set)
Quiz
•
Professional Development
23 questions
Basic Teradata Architecture Understanding Quiz
Quiz
•
Professional Development
23 questions
UT8 - Alta Disponibilidad -SAD
Quiz
•
Professional Development
23 questions
A+ - 12A - Explain OS Types
Quiz
•
Professional Development
22 questions
Adreçament amb classe i subnetting
Quiz
•
Professional Development
26 questions
Entrepreneurship
Quiz
•
4th Grade - Professio...
32 questions
HISTORY OF COMPUTERS AND COMPUTER BASICS
Quiz
•
3rd Grade - Professio...
25 questions
HTML
Quiz
•
5th Grade - Professio...
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
