subject

Although computers generally represent numbers as decimals, it is often convenient to express values as fractions. if we desire to convert a decimal to a fraction, we need to follow a two-step process: starting with the number itself, multiply by ten repeatedly until no values remain after the decimal point. this is the numerator. keep the multiplier as the denominator. simplify the fraction. for instance, for 0.75: multiply by ten repeatedly: 0.75×10×10=75 thus the numerator is 75 and the denominator is 10×10=100. simplify the fraction: find the factors of the numerator and the denominator. 75→{1,3,5,15,25,75}100→{1,2,4,5,10, 20,25,50,100} find the greatest common factor of each and divide both by it. 75÷25=3100÷25=4 0.75→34 write a function factors( n ) which accepts a number n and returns a list containing all of the factors of that number. (this is a common task. write your own code—don't just it! ) write a function fraction( n ) which accepts a decimal number n and returns a tuple ( numerator, denominator ) of the resulting fraction representation.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
You know the right answer?
Although computers generally represent numbers as decimals, it is often convenient to express values...
Questions
question
English, 07.12.2021 01:00
question
Computers and Technology, 07.12.2021 01:00
question
English, 07.12.2021 01:00
question
Social Studies, 07.12.2021 01:00
question
English, 07.12.2021 01:00
Questions on the website: 13722359