Python实验二人民币汇率转换
作者:互联网
Money = input("请输入带有符号的钱:")
if Money[0:3] in 'RMB':
USB = eval(Money[3:]) / 6
print("转换后的钱是USB{:.2f}".format(USB))
elif Money[0:4] in 'USB':
RMB = eval(Money[3:]) * 6
print("转换后的钱是RMB{:.2f}".format(RMB))
else:
print("输入格式错误")
标签:RMB,转换,USB,format,Python,Money,汇率,2f,print 来源: https://blog.csdn.net/weixin_49353816/article/details/114835331