@ENDY墨
# 汇率
exchange_rate = float(input('输入1美元对人民币的汇率:'))
while True:
# 需要转换的钱数
money = input('输入要转换的钱数:')
if money.startswith('RMB'):
print('USD' + str(int(money.replace('RMB',''))/exchange_rate))
elif money.startswith('¥'):
print('$' + str(int(money.replace('¥',''))/exchange_rate))
elif money.startswith('$'):
print('¥' + str(int(money.replace('$','')) * exchange_rate))
elif money.startswith('USD'):
print('RMB' + str(int(money.replace('USD','')) * exchange_rate))
