Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Activity Overview: Learning Objective: This activity provides an opportunity to apply your Python programming skills to a real - world problem in the domain of

Activity Overview:
Learning Objective: This activity provides an opportunity to apply your Python programming
skills to a real-world problem in the domain of currency conversion. By completing this activity,
you will gain practical experience of using python basic constructs in designing and implementing
software solutions and enhance your ability to develop user-friendly applications.
Introduction: Your task is to develop a simple currency converter program in Python. The
program should allow users to convert currency values between United Arab Emirates Dirham
(AED), Euro (EUR), British Pound (GBP), and US Dollar (USD). You are required to design and
implement the program based on the provided description.
Activity Components
Understanding the Requirements:
Your activity involves creating a Python program that facilitates currency conversion
between AED and other major currencies.
The program should present users with a menu allowing them to choose the direction of
conversion (AED to other currencies or other currencies to AED).
Users should be prompted to enter the amount they want to convert and select the
currency they want to convert to/from.Designing and Implementing the Solution:
Design a modular solution that consists of functions to perform currency conversion
operations.
Write Python functions to perform currency conversion operations. These functions
should handle conversion between AED and Euro, British Pound, and US Dollar, as well as
conversion from other currencies to AED.
Implement a main function that presents users with a menu to select the conversion
direction and guides them through the conversion process.
All the input data must be positive. Therefore, you need to validate the input.
Implementation Requirements:
The user interface should provide clear instructions and options for selecting the
conversion direction and entering currency amounts.
Use constants to represent conversion rates between currencies. Constants should be
defined for conversion rates from AED to Euro, British Pound, and US Dollar.
Your solution should include the following functions with the given signatures:
For AED to other currencies menu option:
def aed_to_euro(money):
def aed_to_british_pound(money):
def aed_to_dollar(money):
For other currencies to AED menu option:
def dollar_to_aed(amount):
def british_pound_to_aed(amount):
def euro_to_aed(amount):Sample Runs:
Run 1: The user chooses to convert from AED to other currencies. Then, he/she chooses to convert 100
AED to British Pound. Thus, the result is 21.48 GBP. Then the program asks the user if he/she want to
make another conversion and so on.Run 2: The user enters a wrong choice value (e.g.4) as conversion direction. Since this option is invalid,
the program displays the "Invalid choice" message and ask the user to re-enter a correct choice and etc.
Once, the user enters a correct choice e.g.1), the program stops asking and now it is waiting for user to
enter the amount, etc.Run 3: The user enters an invalid amount value (e.g.-100). Since this amount is invalid, the program
displays the "Invalid amount" message and ask the user to re-enter a correct amount and etc.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago