Answered step by step
Verified Expert Solution
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 realworld 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 userfriendly 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 tofromDesigning 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 aedtoeuromoney:
def aedtobritishpoundmoney:
def aedtodollarmoney:
For other currencies to AED menu option:
def dollartoaedamount:
def britishpoundtoaedamount:
def eurotoaedamount:Sample Runs:
Run : The user chooses to convert from AED to other currencies. Then, heshe chooses to convert
AED to British Pound. Thus, the result is GBP Then the program asks the user if heshe want to
make another conversion and so onRun : The user enters a wrong choice value eg as conversion direction. Since this option is invalid,
the program displays the "Invalid choice" message and ask the user to reenter a correct choice and etc.
Once, the user enters a correct choice eg the program stops asking and now it is waiting for user to
enter the amount, etc.Run : The user enters an invalid amount value eg Since this amount is invalid, the program
displays the "Invalid amount" message and ask the user to reenter a correct amount and etc.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started