What is the output of the following math function
import math
print(math.ceil(252.4))
print(math.floor(252.4))
SKILL QUIZ
Quiz
•
Computers
•
University
•
Medium
kanishka G
Used 2+ times
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following math function
import math
print(math.ceil(252.4))
print(math.floor(252.4))
252
252
252
253
253
252
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the add()
function call
def add(a, b):
return a+5, b+5
result = add(3, 2)
print(result)
15
8
(8, 7)
Syntax Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following list function?
sampleList = [10, 20, 30, 40, 50]
sampleList.pop()
print(sampleList)
sampleList.pop(2)
print(sampleList)
[20, 30, 40, 50]
[10, 20, 40]
[10, 20, 30, 40]
[10, 20, 30, 50]
[10, 20, 30, 40]
[10, 20, 40]
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following print()
function
print('%d %d %.2f' % (11, '22', 11.22))
11 22 11.22
TypeError
11 ’22’ 11.22
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following range()
function
for num in range(2,-5,-1):
print(num, end=", ")
2, 1, 0
2, 1, 0, -1, -2, -3, -4, -5
2, 1, 0, -1, -2, -3, -4
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following
sampleDict = dict([
('first', 1),
('second', 2),
('third', 3)])
print(sampleDict)
[ (‘first’, 100), (‘second’, 200), (‘third’, 300) ]
Options: SyntaxError: invalid syntax
{‘first’: 1, ‘second’: 2, ‘third’: 3}
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which method is used to read file line by line
read(1)
readlines(1)
readline()
line()
45 questions
TECHNICAL QUIZ
Quiz
•
University
51 questions
Private TST G10 ICT ch 6 and 21 final trial
Quiz
•
11th Grade - University
50 questions
Technical Quiz 2022-23
Quiz
•
University
53 questions
HTML And CSS
Quiz
•
4th Grade - Professio...
50 questions
HTML CSS Quiz
Quiz
•
University
52 questions
ICT 100 - 150
Quiz
•
University
55 questions
JAVASCRIPT LONG
Quiz
•
University
48 questions
Python Programming
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade