Question: we dont use the round function in this question ?! Task Standard input consists of a single integer, a distance measured in meters. Write a
Task Standard input consists of a single integer, a distance measured in meters. Write a Python script named distance-in-kilometers. py which writes the corresponding distance in kilometers to standard output. Rounding Round fractional kilometers of strictly less than 500m down to the nearest kilometers, and greater than that up. For example, 7499m becomes 7km whereas 7500 becomes 8km. Your solution may not use the Python built-in function round ( ). Example standard input 1 Example standard output 1 Example standard input 2 Example standard output 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
