Answer:
Code is given as:-
#number_of_pennies function with one default argument with pennies as 0 when no pennies parameter is given
def number_of_pennies(dollars,pennies = 0):
pennies = dollars*100 + pennies #one dollar equals 100 pennies so calculate total pennies with this formula
return pennies #return total pennies
print(number_of_pennies(int(input()),int(input()))) #both Dollars and pennies
print(number_of_pennies(int(input()))) #Dollars only
Explanation:
Here is the sample code and output.
The function is as follows:
def number_of_pennies(dollars,pennies=0):
return dollars*100+pennies
This defines the function
This returns the number of pennies
<em>Note that, if the number of pennies is not passed to the function, the function takes it as 0</em>
Answer:b
Explanation:gszrxewzgdtxherhzre
r u Kate tell me plz I love u baby tell me please
Select the data to sort