Comp 1572, Winter 2002 Programming Assignment 1 Assigned January 4, 2002 Due Wednesday, January 16, 2002 These problems constitute a sequence of problems in Deitel and Deitel. Each problem asks you to add a level of sophistication to the previous program. Do these problems, handing in one program that contains all of the features. On the day the program is due, bring to class a hard copy of your source code. In addition, before class begins on the due date, email your source code - mailing instructions will be announced later. 3.35 Computers are playing an increasing role in education. Write a program that will help an elementary school student learn multiplication. Use rand to produce two positive one-digit integers. It should then type a question such as: How much is 6 times 7? The student then types the answer. Your program checks the student's answer. If it is correct, print "Very good!", and then ask another multiplication question. If the answer is wrong, print "No. Please try again." and then let the student try the same question again repeatedly until the student finally gets it right. Note: The program asks multiplication questions indefinitely - a new one every time the student gets the problem correct. But as described, this program doesn't give you a way out. I think it should, don't you? 3.36 The use of computers in education is referred to as computer-assisted instruction (CAI). One problem that develops in CAI environments is student fatigue. This can be eliminated by varying the computer's dialogue to hold the student's attention. Modify the program of Exercise 3.35 so the various comments are printed for each correct answer and each incorrect answer as follows: Responses to a correct answer Very good! Excellent! Nice work! Keep up the good work! Responses to an incorrect answer No. Please try again. Wrong. Try once more. Don't give up! No. Keep trying. Use the random number generator to choose a number from 1 to 4 to select an appropriate response to each answer. Use a switch structure to issue the responses. 3.37 More sophisticated computer-aided instruction systems monitor the student's performance over a period of time. The decision to begin a new topic is often based on the student's success with previous topics. Modify the program of Exercise 3.36 to count the number of correct and incorrect responses typed by the student. After the student types 10 answers, your program should calculate the percentage of correct responses. If the percentage is lower than 75 percent, your program should print "Please ask your instructor for extra help" and then terminate.