# Given that 1 dollar = 100 pennies, write a function number_of_pennies() that takes two arguments: the number of dollars, and an optional number of pennies. 
# number_of_pennies() should return the total number of pennies 

#The code reads three values from input and calls number_of_pennies() twice 

def number_of_pennies(number_of_dollars, optional_number_of_pennies=0): 
    return number_of_dollars * 100 + optional_number_of_pennies 

print(number_of_pennies(int(input()), int(input()))) # Both dollars and pennies
print(number_of_pennies(int(input())))               # Dollars only

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: