
Python Programming Quiz
Authored by TĂ¢m Dương
English
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
78 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, a function within a class definition is called a?
an operation
a method
a callable
a class function
a factory
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For the following code, which of the following statements is true? def PrintHello(): print("Hello") x = PrintHello()
Both PrintHello() and x refer to the same object
PrintHello() and x refer to different objects
Syntax error! You cannot assign function to a variable in Python
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the given Python program. a = 10 if a <= 15: print("Hi") else: print("Know Program!")
Hi
Hello
Hi Hello
Hi Know Program
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following reserved keyword is used to end a function, return generator?
break
switch
Return
yield
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following statement list([x for x in range(3, 6)])
[3, 4, 5]
3, def
[100, 101, 102]
It causes an exception
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure is being put to use in the code given below? # Code starts org = 'QuizOrbit' count = {} for i in org: if i in count: count[i]+=1 else: count[i]=1 print(count) # Code Ends
String
List
Tuple
Dictionary
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these collections defines a LIST?
{"name": "apple", "color": "green"}
["apple", "banana", "cherry"]
{"apple", "banana", "cherry"}
("apple", "banana", "cherry")
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?
Similar Resources on Wayground
73 questions
KB2U10-Handout 3
Quiz
•
2nd Grade - University
78 questions
Unit 1: Communication - English B2.6
Quiz
•
University
81 questions
CAE PREPOSITIONS (PART II)
Quiz
•
University
80 questions
IMPORTANT TODAY MIDTERM
Quiz
•
University
73 questions
WEEK 3
Quiz
•
University
75 questions
Business Result Upper-Intermediate Unis 1-3
Quiz
•
University
77 questions
LIKES AND DON'T LIKES
Quiz
•
6th Grade - University
80 questions
Sub-27-12-Test 5-2020-Phần 1, 2
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade