Рет қаралды 1,596
Welcome to this Python tutorial! In this video, we'll guide you through creating a command-line interface (CLI) program in Python that can calculate the distance between two cities located in different countries. We'll make use of essential packages such as inquirer for user input, simple_chalk for colorful output, and geopy for fetching geographical coordinates and calculating distances.
Here's what we'll cover:
1- Installing necessary packages and setting up the project structure.
2- Using inquirer to gather user input for city and country names.
3- Utilizing geopy to obtain latitude and longitude coordinates for each city.
4- Calculating the distance between the two cities based on their coordinates.
5- Enhancing output with simple_chalk, displaying distances in both kilometers and miles.
By the end of this tutorial, you'll have a fully functional Python CLI program that can calculate distances between any two cities globally. It's a practical tool that can be handy for various purposes.
☕ If you found this tutorial helpful and wish to support my work, consider buying me a coffee:
👉 ko-fi.com/bekb...
Explore more of my coding tutorials:
🍎 Bus Schedule CLI with Node.js and Python [+ Sqlite3]:
• Code a bus schedule CL...
🍎 Node.js CLI Application to Calculate Sales Tax:
• Build US Sales Tax Cal...
🔔 Don't forget to subscribe and hit the notification bell to stay updated on more coding tutorials like this!
Join this channel to access exclusive perks:
👉 / @bekbrace
Thank you for watching, and let's dive into building this useful Python CLI program together! 🐍🌍📊