The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Implement a set of functions called getData, extractValues, and calcRatios. Function getData should prompt the user to enter pairs of integers, two per line, with each pair read as a single string, for example,
Enter integer pair (hit Enter to quit):
134 289 (read as "134 289")
etc.
These strings should be passed one at a time as they are being read to function extractValue, which is designed to return the string as a tuple of two integer values,
extractValues("134 289") returns (134, 289)
etc.
Finally, each of these tuples is passed to function calcRatios one at a time to calculate and return the ratio of the two values. For example,
calcRatios( (134, 289) ) returns 0.46366782006920415
etc.
Implement a complete program that displays a list of ratios for an entered series of integer value pairs.Make sure to include docstring specifi cation for each of the functions.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll