PROBLEM 8 (16 pts) - Rational fraction as decimal number Write a function which receives as input two positive integers

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

PROBLEM 8 (16 pts) - Rational fraction as decimal number Write a function which receives as input two positive integers

Post by answerhappygod »

Problem 8 16 Pts Rational Fraction As Decimal Number Write A Function Which Receives As Input Two Positive Integers 1
Problem 8 16 Pts Rational Fraction As Decimal Number Write A Function Which Receives As Input Two Positive Integers 1 (57.14 KiB) Viewed 30 times
PROBLEM 8 (16 pts) - Rational fraction as decimal number Write a function which receives as input two positive integers m and n and returns a string containing the representation of the fraction as a decimal. def rationalFractionToDecimalNumber(m, n): --> It is known that when a rational fraction is represented as a decimal number, it is either finite or periodic. If it is periodic, the period should be denoted in brackets. Some examples: rationalFractionToDecimalNumber (5,8) "0.625" rational FractionToDecimalNumber (25,9) "2.(7)" rationalFractionToDecimalNumber (19,12) --> "11.58(3)" rationalFractionToDecimalNumber (400,99) --> "4.(08)" rationalFractionToDecimalNumber (1,28) "0.03(571428)" --> -->
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply