4.让用户随机输入货币金额,进行货币转换 1美元=7人民币

money = input('请输入一个金额:')

if money[0] == '$':

old = int(money[1:])*7

new = str(old)

print('¥'+new)

elif money.startswith('¥'):

old = int(money[1:])/7

new = str(old)

print('$'+new)