You can use the `open() `function to open a file and the `read() `method to read its contents. For example
Category: Python
def print_rectangle(n, m) : for i in range(1, n+1) : for j in range(1, m+1) :
def print_rectangle(n, m) :
for i in range(1, n+1) :
for j in range(1, m+1) :
if (i == 1 or i == n or
j == 1 or j == m) :
print(“*”, end=””)
else :
print(” “, end=””)
print()
Write a code for a program in python. https://uic.blackboard.com/bbcswebdav/pid-
Write a code for a program in python.
https://uic.blackboard.com/bbcswebdav/pid-11677643…
Here is the link for that txt file data set
I have also attached the code and the output from my last assignment.
Assessment 3 – Forex Converter Goals In this unit, you’ll: Have your first asse
Assessment 3 – Forex Converter
Goals
In this unit, you’ll:
Have your first assessment of Section II
Learn how to use Markdown
Projects & Exercises
The assessment has three parts
In the first part, you’ll be asked a series of conceptual questions
In the second part, you’ll build a currency converter in Flask and Python
In the third part, you’ll write some tests to make sure it works
Please Note: the forex-module originally used on this assessment is experiencing technical issues. We are currently using a clone of the API hosted at exchangerate.host for this assessment, which means it will work slightly differently. Temporary instructions have been added to the project instructions for using this cloned API.
0/2
1
Foreign Exchange Converter
The dynamics between currencies are fascinating. Currency trading may not be as popular as trading stocks, but people do make a living off of it. If you don’t trade currency, but you plan on leaving the country, you’ve got to know the value of their currency relative to yours.
In this assessment, you’re going to build a currency converter that will tell you the value of one currency in a second specified currency. There will also be a conceptual section to this assessment and a portion where you test your converter at the end.
2
Introduction to Markdown
In this assessment, you’re going to build a currency converter which will tell you the value of one currency in a second specified currency. There will also be a conceptual section to this assessment. In order to complete this section, you’ll need to download a Markdown editor and write your answers there. You’ll find instructions to get you up to speed with Markdown below. The final portion of the assessment, you’ll test your converter.
www.markdowntutorial.com/
www.markdownguide.org/basic-syntax/
3
Install Markdown
To write Markdown, you’ll need to install a Markdown editor.
If you’re on a Mac, you can install an editor called MacDown.
If you’re on Windows? Use MarkdownPad.
Or, you could explore VS Code Plug-ins for writing Markdown. Some students find these plug-ins work better on their machines than the above technologies.
4
Assessment – Forex Converter
Save
10 – 15 Hours
143 Points
Please note: For some currencies, you will see the following error: forex_python.converter.DecimalFloatMismatchError.If you see this error, just use different currencies and proceed.
For instance, try converting USD to EUR since that seems to consistently work. There is a bug with how some, but not all, of the currencies are being converted in the new update, which the developer is working to fix. It should not block you from completing the assessment.
You will find the assessment linked below. The purpose of this assessment is not just to internalize the material, but to give you a benchmark so you know how you are doing in the course. It is also intended to spark a conversation with your mentor on your strengths and areas of growth, that will help you understand what to focus on in your job search. Be sure to mention how long the assessment took when you talk to your mentor.
Please keep track of the hours you spend on the assessment in this sheet. Most students complete these assessments within 15 hours. If you find yourself struggling to complete the assessment, and you put in at least 25 hours of work, you have the option to submit the work you have done and continue with the course. If you do this, you will need to spend your next mentor session or sessions going over the steps it would have taken to complete the assessment. Please include this time sheet in your final submission.
Assessments are meant to be completed independently, without consulting with your mentor, TA, or online student community. Please refrain from any discussions on Slack regarding this assessment until you have completed it.
When you’ve finished, save your assessment on private GitHub repo and submit your project here below. Be sure that the link is correct, as you can only submit once. You will need to add your mentor to the private repo so they have access to your work. Your mentor will review your assessment and offer you feedback on how you did!
You can only submit the assessment once. The text below the ‘Submit’ button might tell you multiple submissions are okay, don’t listen! In the case of assessments, only the first submission is accepted.
This assessment will have a portion in Markdown, so be sure to follow our instructions about how to write in Markdown and download the correct Markdown editor.
Forex Converter
Assessment: Flask 1
Download code
Part 1: Conceptual
Answer the following questions inside the conceptual.md file.
Part 2: Whose Currency is it Anyway?
You’re going to build a small currency converter! This will be done using the exchangerate.host API which you can read about here.
You will need to make API calls within your route in your app.py.
This is a temporary fix to the use of the forex-python module, and as a result your code and the solution will have differences.
If you want to review your code once you have completed the assessment you should work closely with your mentor. Again, there is no solution covering the use of this in route API call.
Make sure your application has the following:
A form with three inputs:
One input to type in a three letter currency code to convert from
One input to type in a three letter currency code to convert to
Another input to type in a number amount to convert
This could look like this:
Once the form is submitted, make sure that a valid currency code (eg, USD, EUR, JPY) has been input for the currency you are converting from and the currency you are converting to. If the currency code is invalid, you should display a friendly error message to the user letting them know that the currency code is invalid. If the amount is not a valid number, note that, too:
(Hint: To handle the error of an invalid currency code, it may help to check what type of error is raised in the forex-python module and handle it gracefully.)
If the currency code is valid, you should display a message to the user letting them know the value in the currency they are trying to convert into. When you display the converted currency, it should have an accompanying currency symbol and be rounded to two decimal places. For example, if we were to convert 100 USD to EUR, we would expect a reuslt like “€ 85.16”This could look like this:
Refactor your code to move any logic that’s isn’t about the route itself to functions in other Python file(s). Remember, separate your concerns — if you end up with a function that, say, checks if a currency code is valid, you might want this later in a non-Flask app, so move it out of app.py.
It seems like much, but it’s not. All of the reading in the pdf is to walk you t
It seems like much, but it’s not. All of the reading in the pdf is to walk you through the codes and how to implement them.
I did my assignment but the last part which is generation text does not work wit
I did my assignment but the last part which is generation text does not work with me
I thing the problem is the space, it need to handle I need to generate text that has as least word make sense
I wrote multiple function you can use them it is in second part, my model is saved , and my code is providing. I need generation for text that has meaning not like what I did I can generate like eeeeeeeeeee, or nnnnnn The problem was in my code the space I think make every thing repating the pattern.
<----------------------------------------------->
Text generation: For only the bigram and trigram language models trained on English, extend your programs so that you can generate sentences. That is, given any English letter(s) as input and based on the n-gram model you should continue the sentence with the most likely characters. More specifically, given a letter to begin a sentence with, you should choose as the next character that character that yields the highest n-gram count when composed with previous characters into a n-gram. Thus, you will use the previous character for bigrams and previous two characters for trigrams. Your program should continue generating new characters until you have generated a 100 character sentence or you have reached a dead end (all n-gram counts are zero).
generated text outputs for the following inputs: bigrams starting with 10 letters of your choice, and trigrams using those 10 letters as the first character with a second meaningful character of your choice. This is for English bigram and trigram models, both unsmoothed and smoothed
critical analysis of your generation results: e.g., are there any difference between the sentences generated by bigrams and trigrams, or by the unsmoothed versus smoothed models? Give examples to back up your conclusions.
VIEW THE DOC BELOW I NEED THE OUTPUT EXACTLY THE SAME AS IT WRITTEN ,FOLLOW THE
VIEW THE DOC BELOW I NEED THE OUTPUT EXACTLY THE SAME AS IT WRITTEN ,FOLLOW THE INSTRUCTIONS IN THE DOCUMENT I NEED IT AS IT ,I WANT IT IN BYCHARM SEND BE THE PYTHON FILE WITH THE CODES IN A ZIP FILE
Dears…………. Kindly using ChatGPT is not allowed as our University’s websi
Dears………….
Kindly using ChatGPT is not allowed as our University’s website detects web similarities which will affect the final result .DOCx file is attached .Using comments with reference with my name is preferred .
Midterm Project: We will solve the Logistics problem in Amazon in this project.
Midterm Project:
We will solve the Logistics problem in Amazon in this project. We will solve a warehouse inventory problem.
Here are some key information about the midterm projects and you need read the mid_project explained file carefully to finish this work:
You need all the skills you have acquired from previous labs to solve this proble
Grading: 100 points
10 points – towards how good your solution is. We will check how you wrote the code and solved the problem, how efficient and optimized your code is. Specifically, your code will be graded based on the following factors: 1. Correctness: The code should produce the expected outputs and solve the problem correctly. 2. Readability: The code should be easy to read and understand with added comments. 3. Structure and organization: The code should be well-structured and organized. It should contain functions to modularize the code. Functions must have clear responsibilities and be appropriately organized. 4. Documentation and comments: The code should have clear and concise documentation to explain its purpose, inputs, outputs, and any important details. 5. Efficiency: The code should be efficient in terms of time and space complexity. 90 points: The Estimated Value for Each Warehouse – 30 points The 300*300 distance matrix generated – 30 points
This assignment is on data and sourcing. Pls kindly follow the instructions. Thi
This assignment is on data and sourcing. Pls kindly follow the instructions. This is strictly on python