Sunday, February 27, 2022

Miles To Kilometers in Python

 A program that I wrote using Python to ask the user to give distance in miles and then it will convert it into kilometers using Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

Thank you very much for your support





Program Listing

# miles_kilometers.py
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.blogspot.com and www.jakerpomperada.com
# jakerpomperada@gmail.com
# Barangay Mandalagan, Bacolod City, Negros Occidental Philippines
print("");
print("\tMiles To Kilometers in Python");
print("");
miles = float(input("Enter Miles Value : "))
#Convert miles to kilometers
milesToKm = float(miles * 1.6)
#Display the result
print("");
print("There are " + str(format(milesToKm,'.2f')) + " Kilometer(s) in " + str(miles) + " Mile(s), ")
print("");
print("End of Program")
print("");

No comments:

Post a Comment