Project Level 3: Real-World
This project is designed for learners who know Python fundamentals and are learning to build real-world programs.
Project Description
Create a Python command-line application that fetches real-time currency exchange rates and displays the conversion rates between a base currency (like USD) and a list of user-selected target currencies. The app will also allow users to convert amounts between currencies and save the results to a file for later reference.
In the example above, the user enters USD as the base currency and EUR as the target currency and they submit an amount of 10 USD and the program returns 9.6 EUR. The exchange event is saved in a text file:
Tip: You can use the Exchange Rate API for free to get real-time exchange rates with Python. You don’t need an API key.
Learning Benefits
Work with APIs to fetch real-time data.
Practice parsing JSON responses and working with Python’s
requests
library.Learn about user input validation and file operations.
Enhance knowledge of financial data handling.
Prerequisites
Required Libraries: datetime, requests
pip install requests
Required Files: No files are required.
IDE: Use any IDE.
Danger Zone
The solution code is hidden behind the button below. Click to reveal it.
Happy Coding!
Daily Python Projects Team
Looks like the "Show Code" buutons is linked to the "File Metadata Extractor" solution (both are links to p/solution-2f8)
Neverhteless, thanks a lot for all the little projects!