fork download
  1. # Eric Johnson Python Lab 8
  2.  
  3. cost=float(input("Enter the cost of the product:"))
  4. tender=float(input("Enter the amount tendered:"))
  5.  
  6. if (cost < tender):
  7. print ("The change due is ${}".format(tender-cost))
  8.  
  9. elif (cost > tender):
  10. print ("That is not enough")
  11.  
  12. else:
  13. Print ("No change is due")
Success #stdin #stdout 0.02s 28384KB
stdin
5
1
stdout
Enter the cost of the product:Enter the amount tendered:That is not enough