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
Similar Resources on Wayground
30 questions
blitz

Quiz
•
University
35 questions
FINAL_EXAM (CFP_122)

Quiz
•
University
25 questions
Fundamentos de Programación

Quiz
•
University
25 questions
latihan PHP tahap 2

Quiz
•
11th Grade - University
25 questions
Java Review

Quiz
•
9th Grade - University
30 questions
Python Quiz

Quiz
•
University
30 questions
Code debugging - Round 1

Quiz
•
University
25 questions
MATLAB Exam prep

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University