Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have a file quotes.txt containing quotes, one per line, on security. Write a

ID: 3889534 • Letter: Y

Question


You have a file quotes.txt containing quotes, one per line, on security. Write a function quote() that takes a piece of text (i.e., a string) as input and prints any quote that contains that piece of text.
I've got this error every time, what I did wrong??Thanks >>quote ('watch') Traceback (most recent call last) File "", line 1, in quote ('watch') File "c:/Users/Kitsch/Desktop/md.py", line 2, in quote with open 'quotes.txt') as fp: FileNotFoundError: [Errno 2] No such file or directory: 'quotes.txt'

Explanation / Answer

This error is generally occurs when you placed a file some where else. You need to put the quotes.txt in the same folder from where you are running your script. Let me know if you are facing any issues.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote