Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bec9f88 commit 96ce732Copy full SHA for 96ce732
CurrencyConverter/main.py
@@ -23,7 +23,7 @@ def convert_currency_with_api(amount, from_currency, to_currency, api_key):
23
if exchange_rate is not None:
24
converted_amount = amount * exchange_rate
25
result = (
26
- f"{amount} {from_currency} is equal to {converted_amount} {to_currency}"
+ f"{amount} {from_currency} is equal to {round(converted_amount, 2)} {to_currency}"
27
)
28
return result
29
else:
0 commit comments