Hello, I am trying to write a program in Pynthon. I do not know may be it is too much. Just need some directions. Thank you 1. Create a new Jupyter Notebook, using your name for the file name as we...


Hello,


I am trying to write a program in Pynthon.


I do not know may be it is too much. Just need some directions.


Thank you


1. Create a new Jupyter Notebook, using your name for the file name as we normally do. Make sure you can download it and it is a .ipynb file and that it will work when I upload it to my Jupyter.
2. Write code that opens and reads Websites.txt (found in BB under Data Files) and uses it to build a dictionary that contains arrays of the URL's in the file as values and keywords as keys. It should look something like the below:{'soccer':['goal.com','mls.com','espn.com'...
3. In the dictionary, keys should be unique (i.e., in the above example, 'soccer' should only appear once as a key). URL's may appear more than once (e.g., ESPN should appear in the value for 'soccer' as well as 'sports').
4. Prompt the user for a key term and print the URL's that correspond to that term. If I input 'recipes' then foodnetwork.com and recipes.com should appear.
5. If the user enters a key term that is not found in the file, just print 'No results found for your key word.'6. I will test this by running it using a text file with a completely different list of keywords and URL's.



Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here