#moneyConvert.py
money = input()
if money[0] in [‘R’,‘r’]:
USD = (6.78) * (eval(money[1:-1]))
print(“USD{:.2f}”.format(USD))
elif TempStr[0] in [‘U’,‘u’]:
RMB = eval(money[1:-1])/6.78
print(‘RMB{:.2f}’.format(RMB))
else:
print(‘输入格式错误’)
为什么这个Python跑出来,公式算出错的答案,美元和人民币兑换
python菜鸟问题
最新推荐文章于 2024-09-14 08:25:16 发布