Python Function
Quiz
•
Computers
•
University
•
Hard
Fathoni Mahardika
Used 16+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the expression?
round(4.5676,2)?
4.5
4.6
4.57
4.56
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the functions shown below?
divmod(10.5,5)
divmod(2.4,1.2)
(2.00, 0.50)(2.00, 0.00)
(2, 0.5)(2, 0)
(2.0, 0.5)(2.0, 0.0)
(2, 0.5)(2)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the function shown below?
hex(15)
f
0xF
0Xf
0xf
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
d = {"john":40, "peter":45}
d["john"]
40
45
“john”
“peter”
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following piece of code?
a={1:"A",2:"B",3:"C"}
print(a.get(1,4))
1
A
4
Invalid syntax for get method
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following snippet of code?
total={}
def insert(items):
if items in total:
total[items] += 1
else:
total[items] = 1
insert('Apple')
insert('Ball')
insert('Apple')
print (len(total))
3
1
2
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is called when a function is defined inside a class?
Module
Class
Another function
Method
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
34 questions
Computer Classification
Quiz
•
University
25 questions
TechZoom24-BugBash_Prelims
Quiz
•
University
25 questions
Web Application Frameworks
Quiz
•
University
28 questions
TIN 7 ÔN TẬP CUỐI KỲ 1
Quiz
•
7th Grade - University
25 questions
Python Module 1
Quiz
•
University
25 questions
PYTHON CONTEST
Quiz
•
University
25 questions
SQL MIDTERM EXAM
Quiz
•
University
25 questions
Human and Computer Interaction Part 2
Quiz
•
University - Professi...
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 Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
