← Back to challenges

Convert Yen to USD

PythonMediummathnumbers

Instructions

Create a function that can turn JPY (Japanese yen) to USD (American dollar).

Examples

yen_to_usd(1) ➞ 0.01

yen_to_usd(500) ➞ 4.65

yen_to_usd(649) ➞ 6.04

Notes

  • Each JPY to USD conversion is JPY / 107.5
  • Round the result to two decimal places.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Broken Bridge