#1
TempStr = input ("输入金额(以$或¥结尾):")
if TempStr[-1] in ['¥']:
    C = (eval (TempStr[0:-1]))/6.8435
    print("转换后的美元{:.2f}美元".format(C))
elif TempStr[-1] in ['$']:
    F=6.8435*eval(TempStr[0:-1])
    print("转换后的人民币{:.2f}元".format(F))
else:
    print("输入错误,请在金额后加$或¥")
#2
TempStr = input ("输入金额(以USD或CNY结尾):")
if TempStr[-3:] in ['CNY']:
    C = (eval (TempStr[0:-3]))/6.8435
    print("转换后的美元{:.2f}美元".format(C))
elif TempStr[-3:] in ['USD']:
    F=6.8435*eval(TempStr[0:-3])
    print("转换后的人民币{:.2f}元".format(F))
else:
    print("输入错误,请在金额后加USD或CNY")