Мой профиль
ACTIVITY 12 / 50

Distance converter

Try as many times as you need

Let’s understand

A computer can convert measurements. One kilometre contains one thousand metres. Multiply a distance in kilometres by 1000 to get metres. input returns text; float converts a number with a decimal point so you can calculate with it. Test a whole distance and half a kilometre.

Listen to the explanation

Example

hours = 1.5
print(hours * 60)
YOUR MISSION

Read kilometres using float(input()). Print metres. For input 1.5, output 1500.0.

I need a hint

Multiply the input by 1000. Print only the number.

How to find an error
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.