Write a CAI (Computer Assisted Instruction) program as discussed in class to ask a student for...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 ? 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 ?
Expert Answer:
Answer rating: 100% (QA)
Here is the completed code for this problem Comments are included go through it learn how th... View the full answer
Related Book For
Introduction to Probability
ISBN: 978-0716771098
1st edition
Authors: Mark Daniel Ward, Ellen Gundlach
Posted Date:
Students also viewed these accounting questions
-
As discussed in class from the Video shown: Arnold Palmer Hospital. 1) Identify the use of quality methods and tools used in the examples shown (give specific examples) 2) Comment on their use and...
-
Using a computer program that can generate random integers on the interval (0, 9) with equal probabilities, generate 1,000 such integers And use the frequency interpretation to estimate the...
-
A program for generating random numbers on a computer is to be tested. The program is instructed to generate 100 single-digit integers between 0 and 9. The frequencies of the observed integers are as...
-
5 Question 42 (2.5 points) Consider a put option that gives the long position the right to sell the underlying asset for $12.34 in 5.67 years. The continuously compounded risk free rate of interest...
-
Vale S.A., a Brazilian mineral products company, provided the following note on a voluntary basis in its 2009 annual report: 11Cash Generation (Unaudited) Consolidated operating cash generation...
-
An electing S corporation has a $30,000 ordinary loss for the non-leap year. On January 1, Beverly and Sonya own equally all of the S corporation stock. On the 146th day of the year, Beverly gives...
-
When a system undergoes an irreversible (spontaneous) process (a) \(\Delta S_{\text {System }}+\Delta S_{\text {Surroundings }}>0\) (b) \(\Delta S_{\text {System }}+\Delta S_{\text {Surroundings }}...
-
Mancuso Corporation amended its pension plan on January 1, 2012, and granted $160,000 of prior service costs to its employees. The employees are expected to provide 2,000 service years in the future,...
-
Dawson Toys, Limited, produces a toy called the Maze with the following standards: Direct materials: 8 microns per toy at $0.31 per micron Direct labor: 1.5 hours per toy at $6.80 per hour During...
-
Mahalo Boat Adventure Inc. has a July 31 year-end. It showed the following partial amortization schedules regarding two bond issues: Required Answer the following for each bond issue: a. Were the...
-
Assume Avaya contracted to provide a customer with Internet infrastructure for $2,910,000. The project began in 2024 and was completed in 2025. Data relating to the contract are summarized below:...
-
Farrow Company reports the following annual results. Contribution Margin Income Statement Per Unit Annual Total Sales (440,000 units) $ 15.00 $ 6,600,000 Variable costs Direct materials 2.00 880,000...
-
Millard Publishing receives payments in advance for its magazine subscriptions and records these payments as Unearned Subscription Revenue. Millard started the year with a balance of $358,000 in the...
-
Kido Company makes a product "Blue". It takes 100,000 direct labor hours to manufacture the product. Total overhead for the product is $400,000. Using the traditional cost method of direct labor...
-
Merrill Lynch had a written policy that required its employees to hold client information in strict confidence. What instruction did Peter Bacanovic give Douglas Faneuil on the morning of December...
-
In the balance sheet, cash is 200,000; accounts receivable 50,000; other assets 25,000; total current assets missing. Under long term assets; fixed assets 75,000; total assets missing. Find the...
-
The triangles below are similar. Write a proportion to find each missing measure. Then solve. 6 15 8 12 X
-
If the jobs displayed in Table 18.24 are processed using the earliestdue-date rule, what would be the lateness of job C? TABLE 18.24 Processing Times and Due Dates for Five Jobs Job C D E...
-
A total of 3n bears are in a bucket: n are red, n are yellow, and n are blue. A child begins grabbing the bears at random, with all selections equally likely. The bears are selected "without...
-
The average number of students in a class at a certain university is 31. a. Use the Markov inequality to find an upper bound on the probability that a class selected at random will have 40 or more...
-
Let X, Y have joint density fX,Y(x, y) = 14e-2x-7y for x > 0 and y > 0; and fX,Y(x,y) = 0 otherwise. Find the variance of the sum of X and y, i.e., find Var (X + Y).
-
Oxygen at \(30{ }^{\circ} \mathrm{C}\) and \(300 \mathrm{kPa}\) absolute pressure expands isothermally to an absolute pressure of \(120 \mathrm{kPa}\). Determine the final density of the gas.
-
An important dimensionless parameter concerned with very high-speed flow is the Mach number, defined as \(V / c\), where \(V\) is the speed of the object such as an airplane or projectile, and \(c\)...
-
The "power available in the wind" of velocity \(V\) through an area \(A\) is \[ \dot{W}=\frac{1}{2} ho A V^{3} \] where \(ho\) is the air density \(\left(0.075 \mathrm{lbm} / \mathrm{ft}^{3} ight)\)....
Study smarter with the SolutionInn App