![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 23.03.2021 20:50 61497
Create a function that takes a list containing more than one sublists as an argument or parameter. Each sublist has 2 elements. The first element is the numerator and the second element is the denominator.
Return the sum of the fractions rounded to the nearest whole number.
Step 1: First, consider the sublist [18, 13]. Divide the first number in this list i. e. 18 by the second number in this list i. e. 13 using list indexing method.
Step 2: Next, consider the second sublist [4, 5]. Divide the first number in this list i. e. 4 by the second number in this list i. e. 5 using list indexing method. There can be more than two sublists. So, perform Step 1 and Step 2 using for loop.
Step 3: Calculate the sum of fractions by adding the results obtained in Step 1 and Step 2.
Step 4: Round off the result to the nearest whole number using the round() function. The syntax of round() function is:
Syntax: round(float_num, num_of_decimals)
where,
float_num is the number to be rounded.
num_of_decimals is the number of decimal places to be considered while rounding. If not specified, number will be rounded to nearest whole number.
For example:
round(2.18,1) will give 2.2
round(2.18) will give 2
Please help!!!
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 22:30
This isn’t really school related, but like where the heck can you find manga, to read to where you don’t have to pay money, for points? my friend wants me to read bj alex, and i can’t find it anywhere for free.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
![question](/tpl/images/cats/informatica.png)
You know the right answer?
Create a function that takes a list containing more than one sublists as an argument or parameter. E...
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 30.11.2021 04:20
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
Business, 30.11.2021 04:20
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 30.11.2021 04:20
![question](/tpl/images/cats/istoriya.png)
History, 30.11.2021 04:20
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 30.11.2021 04:20
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 30.11.2021 04:20
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)