Hey im new to python and my teacher wants us to create a function with multiple functions. Here is what my program looks like
def main():
carpetyards = float(input("Enter amount of yards the carpet is"))
carpetcost = 5.50 * carpetyards
fee = carpetcost + 25.00
tax = .06 * fee
totalcost = fee + tax
results()
def results():
print()
print('carpetyards :' , format (carpetyards))
print('carpetcost :' , format (carpetcost, '9,.2f'))
print('fee :' , format (fee, '9,.2f'))
print('tax :' , format (tax, '9,.2f'))
print('totalcost :' , format (totalcost, '9,.2f'))
main()
I get either nameerror or results is not defined error. Can someone please help?
results().