for and while loops in matlab

1 view (last 30 days)
abdul dhwh
abdul dhwh on 21 Feb 2019
Commented: Adam on 21 Feb 2019
Background:
This program will focus on providing arithmetic practice for users who want to test their knowledge of basic multiplication (and potentially addition, subtraction, and division). There are minimum requirements for the program. Once you have met the minimum requirements, you have the option of adding more features that can increase your score well beyond 100% on this assignment. These additional points can offset points lost on previous in-class programming assignments.
Design Statement:
Write a fully commented MATLAB script that will allow the user to practice basic multiplication ("2s" through "12s") by ...
  1. Minimum Requirements: (20 points total)
  2. (1 pt) Prompting the user to select an integer value between 2 and 12, inclusive
  1. (8 pts) Randomly generating successive, unique (e.g. non-repeating) multiplication problems that involve multiplying the integer selected in the previous step by an integer value between 2 and 12, inclusive. ("Game Mode 1")
  1. (3 pts) As soon as the user enters an incorrect answer, the script should stop generating problems and output the following information:
You correctly answered __ multiplication problems in a row involving __s.
where the number of correctly answered problems appears in the first blank and the integer the user selected in the first step appears in the second blank.
Note: You must include full header comments that cover the minimum requirements. You do not have to update the header comments for additional features that you add. (5 points for header comments, 3 points for logic comments)
  1. Optional additional features: You can now build on the based code to add functionality. For each additional feature, you can earn additional points. The maximum point value for each feature is specified in parentheses, though I reserve the right to give more points if I am particularly impressed.
Note: Each additional feature should include clear comments within the code that make it clear what additional functionality is being added. If it is not clear from these comments AND any associated prompts what feature is being added, then points will not be awarded. You do NOT have to add information to the header comments for the additional features ... since you have limited time.
  1. (10 pts) Add another "Game Mode" for the user to choose from that randomly generates 10 unique (e.g. non-repeating) problems and then reports the results with the following text string:
You correctly answered __ out of __ problems (__%) involving __s.
where the number of correctly answered problems appears in the first blank, the total number of problems appears in the second blank, the percentages of problems answered correctly appears in the third blank, and the integer the user selected in step 1a appears in the last blank.
  1. Include additional practice modes that can be selected by the user.
  2. (10 pts) Addition
  3. (10 pts) Subtraction
  4. (15 pts) Division ... where the user provides quotient and remainder values for each problem
  1. (5 pts) Add graphical reporting for each Game Mode.
  1. Allow the user to modify ...
  2. (5 pts) Game Mode 1 by choosing how many incorrect answers are allowed before the program stops generating problems and reports the output
  3. (5 pts) Game Mode 2 by choosing how many successive problems to generate before the program reports the output
  1. (5 pts) After the user completes one "round," provide them with the option to start a new round without having to run the program again.
  1. (?? pts) Propose an original feature and then implement it.
Verify that the script works correctly.
  1 Comment
Adam
Adam on 21 Feb 2019
You haven't doine anything beyond copy a homework/test question into the forum so far. Show what you have done, interpret it yourself and ask specific questions on bits you don't understand. If you don't understand any of it you need to ask your teacher as either you missed or didn't understand the classes or the homework is not very appropriate for the stage of learning you are at right now.

Sign in to comment.

Answers (0)

Categories

Find more on Conway's Game of Life in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!