Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help python CSE 231 Spring 2018 Programming Project 03 This assignment is worth 20 points (2.0% of the course grade) and must be completed
Please help python
CSE 231 Spring 2018 Programming Project 03 This assignment is worth 20 points (2.0% of the course grade) and must be completed and turned in before 11:59 on Monday, January 29, 2018. Assignment Overview This assignment will give you more experience on the use of strings and iterations. The goal of this project is to use Google's currency converter API to convert currencies in Python and display the result to user by processing the returned results. Assignment Background The acronym API stands for "Application Programming Interface". It is usually a series of functions, methods or classes that supports the interaction of the programmer (the application developer, i.c., you) with some particular program. Google has several API's available for anyone to use. To interact with Google's currency converter API, you have to create a GET request which is basically a URL and some values inserted in specific places. Our goal is to prompt the user for an amount, original currency and target currency, then setup the URL and request Google currency converter to convert it. We then process the returned value to extract the result, then display it to the user Project Description our program must meet the following specifications 1. At program start, prompt the user for the original currency 2. Then prompt the user for the target currency 3. Next prompt for the amount which must be an int. 4. Setup the URL as explained below and send the request. 5. Convert the returned value to string, and then process it to find the converted valuc 6. Display the result to the user 7. Prompt the user if they want to repeat. Set up URL A sample URL is https://financ You can put that link in a browser and see how Google currency converter converts 100 USD to EUR (convert $100 US to Euros). To change the amount or the currencies, you can simply replace those values in the URL by the values entered by the user. For this project, you can assume the user's currency input is always correct. You will need to check that the amount to be converted is correct. The URL needs to be a string for use in the urlopen (url) call below. You need to construct a URL string that has a value (such as 100 in sample URL above), the currency you are converting from (such as USD in the sample URL above) and the currency you are converting to (such as EUR in the sample URL above). You will be prompting for those three values so you need to insert them into your URL string. How do you do that? In Python we have the string format statement described in Section 4.4 of the text. Usually it is use inside a print ) function, but it doesn't have to be Consider this codc: some str 'XYZ' some int 123 astr = "abc {:d}def{:s)". format (someint, somestr)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