Mik*_*yce 4 python decimal floating-accuracy
print("enter start() to start the program")
def start():
print("This script converts GBP into any currency based on the exchange rate...")
print(" ") #enters a line
exchangeRate = int(input("Enter the exchange rate (Eg: 0.80)"))
print("how much would you like to convert???")
gpb = int(input())
print(gpb*exchangeRate)
Run Code Online (Sandbox Code Playgroud)
如果我将汇率设为0.81而我输入£1则总是返回0.
| 归档时间: |
|
| 查看次数: |
2826 次 |
| 最近记录: |