In: Computer Science
Write a Python program that reads in an amount in cents and prints the dollar amount in that and the remaining value in cents. For example, if the amount reads in is 360 (cents), the program would print 3 dollars and 60 cents. if the amount read in is 75 (cents), the program would print 0 dollars and 75 cents.
def formatPrintDOLLARS(cents):
centsStr = str(cents)
d, c = centsStr[:-2], centsStr[-2:]
if cents > 99:
print(d + ' dollars and ' + c + ' cents')
else:
print('0 dollars and ' + c + ' cents')
return
x=int(input('Enter the Amount in Centes : '))
formatPrintDOLLARS(x)
###PLEASE GIVE A THUMBS UP!!!!!!!!!!!
PLEASE GIVE A THUMBS UP!!!!!!!!!!!