عرض مشاركة واحدة
قديم 28-04-2017, 12:59 AM   #1
sarooosh sarooosh غير متصل
طالب جديد
 
الصورة الرمزية sarooosh

 










عاجل السؤال الثالث tma


ممكن نتساعد في حل السؤال الثالث ما في وقت
Question 3: [25 marks]
 Write a function get_Data that reads and returns the data of a true-false exam of 5 questions for a class of 5 students, e.g. (TFTFT;TTTFF;FFTTT;TFTFF;FFFFF) (2 marks)

 Write a function get_Model to read and return the model answer of a true-false exam, e.g. (TFTTT). (2 marks)

 Write a function get_Result that accepts the answers of the students and model answer then finds and returns their results in 1D array. (The result is the number of correct answers that each student has got out of 5). (5 marks)

 Write a function delete that accepts the answers of the students and the result array to eliminate the student’s answer with the smallest mark together with his/her mark from the result array. (6 marks)
 Write a function print to print the full data of all remaining students. (5 marks)

 Write the main ****** that calls the above methods in their respective order.
(5 marks)

Sample run:

Please enter the students' answer ['TTFFF';'TFTFT';'TTTTT';'FFFFF';'TFTFT']
Please enter the model answer 'TFFTT'

Student’s Data
-------------------
TFTFT 3
TTTTT 3
FFFFF 2
TFTFT 3
sarooosh غير متصل   رد مع اقتباس