We need to convert the kilometers to a float type because they are originally a string.
Note: that the code below will not run because the editor does not support PySimpleGUI. Use your local IDE to run the code instead.
Recommended Course
Python Mega Course: Learn Python in 60 Days, Build 20 Apps Learn Python on Udemy completely in 60 days or less by building 20 real-world applications from web development to data science.