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

This is the code I\'m using (got it from here), but it gives me an error message

ID: 3912173 • Letter: T

Question

This is the code I'm using (got it from here), but it gives me an error message saying:

Traceback (most recent call last):
File "C:/Users//AppData/Local/Programs/Python/Python36-32/ch7 #7(drivers license exam).py", line 2, in <module>
infile = open("C:A1.txt",'r')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\A1.txt'

that are greater than the number n 7. Driver's License Exam The local driver's license office has asked you to create an application that grades the writ- ten portion of the driver's license exam. The exam has 20 multiple-choice questions. Here are the correct answers: 16. C 1. A 2.? 3. A 6. B 8. A 9. C 10. B 12. D 13. ? 14. A 15. D 18. B 19. D 20. A 5. D Your program should store these correct answers in a list. The program should read the student's answers for each of the 20 questions from a text file and store the answers in another list. (Create your own text file to test the application.) After the student's answers have been read from the file, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question num bers of the incorrectly answered questions

Explanation / Answer

Error is because its not able to find File name

=> You should use // instead of one /


Try with below Options

1) C:\A1.txt

2) C:/A1.txt


Let me know if you face any issue. Comment and I will help and make it work

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