我有一个非常基本的问题:
tip = input("What is the total of your bill? ")
tip = int(tip)
print("At 15% tip, you bill would come to:", tip * 1.15)
print("\nAt 20% tip, you're looking at paying:", tip *1.2)
print("Cheers, have a nice day!")
input("\n\nPress enter to exit")
所以我尝试了这个程序,我输入了50,在20%时它很好,它给出了正确的值。但是在15%时,它给了我57.49999999999999。我做错了吗?