Question: Write a CAI (Computer Assisted Instruction) program as discussed in class to ask a student for the answer to 10 random arithmetic problems consisting
Write a CAI (Computer Assisted Instruction) program as discussed in class to ask a student for the answer to 10 random arithmetic problems consisting of addition and subtraction using integers from 1 to 10 only Pick two random integers from 1 to 10 and assign to num1 and num2 and pick a random integer 0 and 1 for the the operation OP If OP is 0 it is addition, 1 is subtraction If it is a subtraction you must make sure that the first number Num1 is bigger than the second number Num2 Ifit is not then swap the numbers by calling a function Swap that you will define. Each corect problem is awarded 10 points Display the total score at the end of the problems Sample run What is 10+5-?7 Incorrect 10+5=15 What is 9.4=?5 Correcti (etc) Your total score is ?
Step by Step Solution
3.34 Rating (163 Votes )
There are 3 Steps involved in it
Here is the completed code for this problem Comments are included go through it learn how th... View full answer
Get step-by-step solutions from verified subject matter experts
