What does the abs() function do in Python?
نشاط الدوال المضمنة الخاصة بالأرقام

Quiz
•
Computers
•
10th Grade
•
Hard
Mohamed Farouk
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The abs() function calculates the square of a number.
The abs() function rounds a number to the nearest integer.
The abs() function returns the absolute value of a number.
The abs() function converts a number to a string.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you use the round() function to round 3.14159 to two decimal places?
round(3.14159)
round(3.14159, 3)
round(3.14, 1)
round(3.14159, 2)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of abs(-10) in Python?
-5
-10
0
10
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If x = -5.7, what will round(x) return?
-6
-7
0
-5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the pow() function in Python?
The pow() function generates a random number.
The pow() function raises a number to a specified power.
The pow() function converts a number to a string.
The pow() function calculates the square root of a number.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you use the min() function with a list of numbers?
You can use min() by calling min(your_list, 0) where your_list is a list of numbers.
You must use min() with a string instead of a list of numbers.
You can only use min() with a tuple, not a list of numbers.
You can use min() by calling min(your_list) where your_list is a list of numbers.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of round(2.5) in Python?
3
2.0
2
1.5
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
HTML Lists Tag

Quiz
•
10th Grade
10 questions
KS4 Programming Techniques (1)

Quiz
•
8th - 10th Grade
15 questions
Computer Science - Python

Quiz
•
9th - 12th Grade
10 questions
C# Math

Quiz
•
10th Grade
15 questions
LO5 - Spreadsheets (1)

Quiz
•
10th - 11th Grade
10 questions
AP CSP Review

Quiz
•
9th - 12th Grade
10 questions
Excel 2019 Formulas and Functions

Quiz
•
8th - 12th Grade
15 questions
APCSP Cumulative Test 2

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade