I’ve been trying to type some code but when I do an arithmetic operation with the variables, I gives me the typeerror “unsupported operand type(s) for *: ‘float’ and ‘decimal.Decimal’”
If you’re not using an IDE with some debug options, you can always use so-called ‘debug printing’ to check the object types, such as d, for example.
Insert print(type(d)) after the d = ((c.get... as it could be that this (or the w or the fn or the m) are not of the correct object type for the finalvalue = ... statement.
.get_rate returns a Decimal (from the decimal module), so d, etc, are a Decimal values.
You’re then trying to mix floats with those decimals using multiplication, but that’s not allowed. You need to one of them to a type that’s compatible with the other. I suggest converting the decimal to a float: