logo

Crowdly

3.2 Write a complete program that reads a list of student names and marks fr...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

3.2 Write a complete program that reads a list of student names and marks from a text file called students.txt. Each line of the file contains a name and a mark separated by a comma. The program should:

  • Open the file for reading.
  • Read each line and split it into name and mark.
  • Convert the mark to an integer.
  • Determine whether the student has passed (mark ≥ 50).
  • Print the result for each student.
  • Handle file not found and data conversion errors using exception handling. [25 Marks]
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на learning.richfield.ac.za?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!