Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents. Write a program in Python

 

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

Students also viewed these Programming questions