When creating a function in PyCharm an error occurred as I tried to use a statement (in my case the try statement) as a parameter.
I also do get an error at second line due to Python tries to resolve the try as well.
amount = float(try * 2.25)
amount = float(DKK * 0.4436)
try is a keyword in Python used in the
try statement. You cannot use keywords as a name.
You need to use another name.
def currency_converter_to_dkk(try_): amount = float(try_ * 2.25) print(amount)