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>
li=list(map(str,input().strip().split()))#taking input of the string.
#swapping first and last element.
temp=li[0]
li[0]=li[-1]
li[-1]=temp
print(li)#printing the list.
I have taken the list li for taking the input of strings.Then after that swapping first and last element of the list.Then printing the list.
Answer : False.
The function to total the values stored in numeric columns is the SUM function.
522