Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents. Write a program in Python that will input the count of quarters, count of dimes, count of nickels and count of pennies and then output the total amount as dollars and cents. You will need to have the following two functions: a) A function called findValue () that will accept four integer values for the number of quarters, number of dimes, number of nickels and number of pennies in that order. This findValue () function will calculate the total value in cents (as integers) and then return this total value as a floating-point value. Hence, if total value is 141 then the return value will be 1.41 which means 1 dollar and 41 cents. b) A function called print Info () that will accept five values, the count of quarters, dimes, nickels and pennies in that order and then followed by total amount as a floating-point value. This function will print the count of each type of coins and then followed by the total value. Add descriptive text to make output displayed more meaningful. In a new document, put your source code PLUS outputs for two different runs of the programs in that document. You must show source code and output SEPARATELY. Please ensure that your screenshot for outputs is shown separately from source code and it must be reaable. If I can't read it, then it means I can't read it. 2 Using functional decomposition, write a program in Python to convert degrees in Celsius to Fahrenheit. Formula for conversion is: Fahrenheit Celsius x (9/5) + 32 You will need to have the following two functions: a) A function called findFahren () that will accept a floating point value for the celsius and then use it to calculate the equivalent Fahrenheit value and return that value to the caller. b) A function called printInfo() that will accept two floating-point values (one for celsius and one for the fahrenheit. Add descriptive text to make output displayed more meaningful. Continue in the same document used for Question 1, in a new page, label clearly "Question #2, then put your source code PLUS outputs for two different runs of the programs in that document. You must show source code and output SEPARATELY. Please ensure that your screenshot for outputs is shown separately from source code and it must be reaable. If I can't read it, then it means I can't read it. Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents. Write a program in Python that will input the count of quarters, count of dimes, count of nickels and count of pennies and then output the total amount as dollars and cents. You will need to have the following two functions: a) A function called findValue () that will accept four integer values for the number of quarters, number of dimes, number of nickels and number of pennies in that order. This findValue () function will calculate the total value in cents (as integers) and then return this total value as a floating-point value. Hence, if total value is 141 then the return value will be 1.41 which means 1 dollar and 41 cents. b) A function called print Info () that will accept five values, the count of quarters, dimes, nickels and pennies in that order and then followed by total amount as a floating-point value. This function will print the count of each type of coins and then followed by the total value. Add descriptive text to make output displayed more meaningful. In a new document, put your source code PLUS outputs for two different runs of the programs in that document. You must show source code and output SEPARATELY. Please ensure that your screenshot for outputs is shown separately from source code and it must be reaable. If I can't read it, then it means I can't read it. 2 Using functional decomposition, write a program in Python to convert degrees in Celsius to Fahrenheit. Formula for conversion is: Fahrenheit Celsius x (9/5) + 32 You will need to have the following two functions: a) A function called findFahren () that will accept a floating point value for the celsius and then use it to calculate the equivalent Fahrenheit value and return that value to the caller. b) A function called printInfo() that will accept two floating-point values (one for celsius and one for the fahrenheit. Add descriptive text to make output displayed more meaningful. Continue in the same document used for Question 1, in a new page, label clearly "Question #2, then put your source code PLUS outputs for two different runs of the programs in that document. You must show source code and output SEPARATELY. Please ensure that your screenshot for outputs is shown separately from source code and it must be reaable. If I can't read it, then it means I can't read it.
Expert Answer:
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
Christopher and Janai have a new grandson. How much money should they invest now so that he will have $78,000 for his college education in 18 years? The money is invested at 3.8% compounded...
-
Consider an input data of the form X= (Xo, X, X2,....., Xn-1) where each X is a byte. A suggested hash function is h(X) = Xo+ X + X+.....+ Xn-1 where + stands for bitwise modulo two addition. Explain...
-
What are the SDGs ? What is their history? How do they support global sustainability agenda?
-
Air temperature usually decreases with increasing altitude. However, during the winter, thanks to a phenomenon called thermal inversion, the temperature of air warmed by the sun in mountains above a...
-
The 4.5-kg block A and the 3-kg block B are connected by a slender rod of negligible mass. The coefficient of static friction is 0.40 between all surfaces of contact. Knowing that for the position...
-
The design characteristics of a gear-reduction unit are under review. Gear B is rotating clockwise with a speed of 300 rev/min when a torque is applied to gear A at time t = 2 s to give gear A a...
-
Check whether the following can define probability distributions, and explain your answers. (a) \(f(x)=\frac{x}{10}\), for \(x=0,1,2,3,4\). (b) \(f(x)=\frac{1}{3}\), for \(x=-1,0,1\). (c)...
-
A single-tank process has been operating for a long period of time with the inlet how rate q1 equal to 30.4 ft3/min. After the operator increases the flow rate suddenly by 10%, the liquid level in...
-
3. The market share of Seattle Mills is $407 million. The claims on Seattle Mills are split between common stock and a 12% debt that has a face value of $350 million and that matures in five months....
-
? ?? ? ? Assume that Alpha and Omega compete in the same four-digit SIC code industry and offer comparable products and services. The following table contains their reported financial performance and...
-
Which of the following is true? The Encapsulated Security Protocol (ESP) provides sourceauthentication, data integrity, and confidentiality. The Encapsulation Security Protocol (ESP) provides...
-
A payment process that reimburses members for out-of-network health expenses is to be controlled through use of a fraction nonconforming chart. Initially, one sample of size 200 is taken each day for...
-
1. What is the mathematical definition of torque, t? 2. What is the unit of torque, t, in the MKS system of units? 3. Are the units of work and torque the same? 4. What is the basic difference...
-
The large-cap stocks achieved a nominal rate of return of 13.36 percent. The inflationary figure observed over the course of the previous year amounted to 1.61 percent. What is the actual return on...
-
What are the "3 15"and why are these essential to learning in the classroom?
-
Kinross is a major Gold Producer. They are expecting a production of 500,000 oz of Gold in 6 months (they are long Gold). The Forward is : $1,800/ troy oz Kinross Purchases a 6 month Gold Put Struck...
-
A thin-walled cylindrical tank of diameter d = 0.5 m and wall thickness t = 5 mm is fabricated of a material with 250 MPa tensile yield strength. Determine the internal pressure p (MPa) required...
-
Which of the following is NOT a magnetic dipole when viewed from far away? a) A permanent bar magnet. b) Several circular loops of wire closely stacked together with the same current running in each...
-
A single bit can represent two values: 0 and 1. Two bits can represent four values: 00, 01, 10, and 11. Three bits can represent eight values: 000, 001, 010, 011, 100, 101, 110, and 111. How many...
-
Create a JavaFX application that implements a short survey. The first question should ask the user for his or her favorite color and present the choices red, orange, blue, and green in radio buttons....
-
Find the documentation for the class Graphics Context in the JavaFX Class Library. (See Exercise 12.) Learn how to use the method strokeRect. Then write statements that can be used in a JavaFx...
-
Zachary and Carrie Sexton (the Buyers) were searching for a home in the Kings wood neighborhood of Atlanta, Georgia. The Buyers real estate agent learned that Russell and Linda Sewell (the Sellers)...
-
The Anchor Glass Container Corporation and its parent company, Consumers Packaging, Inc. (CPI), entered into a series of agreements with Encore Glass, Inc., to supply glass containers of a specific...
-
Washington Tennis & Education Foundation, Inc. (WTEF) is a nonprofit organization operating in the District of Columbia that provides athletic and academic programs for children from low-income...
Study smarter with the SolutionInn App