I am trying to make a currency converter program in python with the use of dictionaries. When using condict.values(UserOrigin-1), I am receiving an error that says "'builtin_function_or_method' is not subscriptable". What does this error mean, and how can I fix it?
def Currency():
condict={
"USD": 1,
"Euro": 1.21,
"Yen": 0.0094,
"UK Pound": 1.39,
"Swiss Franc": 1.12,
}
UserOrigin=int(input("Write the number to indicate which is the original currency.\n1. US. Dollars\n2. Euro\n3. Yen\n4. UK Pound\n5. Swiss Franc\n"))
UserResult=int(input("Write the number to indicate which is the currency to convert to.\n1.US. Dollars\n2. Euro\n3. Yen\n4. UK Pound\n5. Swiss Franc\n"))
UserAmount=int(input("Enter the amount:\n"))
USDAmount=UserAmount*condict.values[UserOrigin-1]
FinalAmount=USDAmount/condict.values[UserResult-1]
print("{} {}s are {} {}s".format(UserAmount, condict.key[UserOrigin-1],FinalAmount,condict.key[UserResult-1]))
Currency()