Calculate the total distance in meters and print your result


Problem

Read in the file "distances.txt". (Info on file below). It contains numbers with units meters (m), centimeters (cm) and millimeters (mm). Calculate the total distance in meters and print your result. i.e. convert all numbers into the same unit, cast them to floats and calculate the sum of all numbers.

The file called distances.txt contains the following information: 50 m 4500 cm 500 mm 45 m 90 m 100000 cm 487446 mm.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Calculate the total distance in meters and print your result
Reference No:- TGS03255861

Expected delivery within 24 Hours