Python123
总结:
TempStr = input() if TempStr[-1] in ['F', 'f']: C = ( eval( TempStr[0:-1] ) - 32 ) / 1.8 print("{:.2f}C".format(C)) elif TempStr[-1] in ['C', 'c']: F = 1.8 * eval( TempStr[0:-1] ) + 32 print("{:.2f}F".format(F)) else: print("输入格式错误")
print("Hello World")
A = "零一二三四五六七八九" Str = input() for C in Str: print(A[ eval(C) ], end = "" )
TempStr = input() if TempStr[0] in ['C', 'c']: C = eval( TempStr[ 1 : ] ) * 1.8 + 32 print("F{:.2f}".format(C)) elif TempStr[0] in ['F', 'f']: F = ( eval( TempStr[ 1 : ] ) - 32 ) / 1.8 print("C{:.2f}".format(F))
Str = input() if Str[0 : 3] == "RMB": ans = eval( Str[ 3: ] ) / 6.78 print("USD{:.2f}".format(ans)) elif Str[0 : 3] == "USD": ans = eval( Str[ 3: ] ) * 6.78 print("RMB{:.2f}".format(ans)) else: print()