Write a program that simulates one week of classes. In each class period, each student in the class is given the opportunity to ask a question. If no student asks a question, then the teacher asks a question of a student at random. If the student answers incorrectly, another student is asked the question. This continues until a student answers correctly. Note: a student may be asked the same question multiple times. Class ends once 50 questions have been asked. There is a 5% chance the fire alarm was pulled the night before class.
When done, the program should display the number of questions asked and answered by the teacher as well as the percentage of questions they answer correctly. In addition, the total number of questions asked by any student as well as the total number of answers given by students should be displayed.
Additional rules