Andrew K.

asked • 01/07/21

Python_Lab_1_Functions

Q = input("number of quarters")

D = input("number of dimes")

P = input("number of pennies")


print("you have this amount of pennies:"),("Q + D + P =", sum)


Use the above code to create the following.

.

Use functions to modify your code based on the below information. Please remember to call your function so it will get executed when you run your program.


You will submit two python files, one for each below.

 

#Create a function where the user inputs the number of quarters, dimes, and nickels and prints out the results of the total value in pennies.


#Create a function that receives required quarters and optional dimes and nickels and the function calculates and prints out the results of the total value in pennies


2 Answers By Expert Tutors

By:

Nicolas P. answered • 01/07/21

Tutor
5 (1)

Student with Real World Experience and a Knack for Teaching

Patrick B. answered • 01/07/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.