Skip to content

Commit

Permalink
Convert USD to GBP as well
Browse files Browse the repository at this point in the history
  • Loading branch information
parafoxia committed Jan 13, 2025
1 parent 9ad81bd commit a1b0a60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@

if __name__ == "__main__":
c = CurrencyConverter()
converted = c.convert(amount := int(sys.argv[1]), "GBP", "USD")
print(f"{amount:.2f} GBP = {converted:.2f} USD")

to_usd = c.convert(amount := int(sys.argv[1]), "GBP", "USD")
print(f"{amount:.2f} GBP = {to_usd:.2f} USD")

to_gbp = c.convert(amount := int(sys.argv[1]), "USD", "GBP")
print(f"{amount:.2f} USD = {to_gbp:.2f} GBP")

0 comments on commit a1b0a60

Please sign in to comment.