Question: Write a function number _ of _ pennies ( ) that returns the total number of pennies given a number of dollars and ( optionally

Write a function number_of_pennies() that returns the total number of pennies given a number of dollars and (optionally) a number of pennies. Ex: If you have $5.06 then the input is 56, and if you have $4.00 then the input is 4.
Sample output with inputs: 564
506
400
Learn how our autograder works
545940.3929478.qx3zqy7''' Your solution goes here '''
print(number_of_pennies(int(input()), int(input()))) # Both dollars and pennies
print(number_of_pennies(int(input()))) # Dollars only

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!