
Concept explainers
1. Complete an
Math Tutor
You will be creating a math tutor program that can be used for young children to practice their math skills. The program will be driven by the following menu:
- See Rules
- Practice Math
- Exit
If the user chooses (1) from the menu, the following rules will be displayed:
This program will help you practice your math skills.
First, you will choose Addition, Subtraction or Multiplication. Next, you will choose a level. Level 1 will give you problems with single digits and Level 2 will use two-digit numbers. Then, you will choose how many math problems you would like to complete. After you have completed all your problems, you will be given a score.
You can play as many times as you want. Have fun!!
If the user chooses (2) from the menu:
- First, prompt from the following math operation menu:
- Addition
- Subtraction
- Multiplication
- Next, prompt from the following level menu:
- Level One
- Level Two
- Next, prompt for the number of math problems to complete.
- Next, use a loop to do the following for each problem:
- Level One – generate two random numbers from 1 – 9
Level Two – generate two random numbers from 1 – 99
Notes : To generate random numbers, use the randint() function from the random Python Library
See attached coin.py sample program for more information on how to generate random numbers - Show the math problem that corresponds with the operation that the user chose.
Note: If the user chose Subtraction, make sure that the larger number comes first. - Prompt the user for the correct answer.
- Calculate the correct answer.
- Compare the user’s answer with the correct answer and display whether or not the user answered correctly.
Keep track of how many the user answers correctly.
- Level One – generate two random numbers from 1 – 9
- After all problems are complete, display the number correct and the percent correct.
If the user chooses (3) from the menu, display a good bye message.
The users can play the game as many times as they wish, until they choose (3) to Exit.
Program must include:
>> Documentation at the top indicating
Filename
Name of programmer
Program description
Algorithm (using pseudocode)
>> Comments throughout the code documenting the main steps described in the algorithm.
>> See attached sample project output as a guideline.
Input Validation:
Validate that all menu choices are valid.
Validate that the number of problems the user enters is positive.
Functions:
Include at least three functions of your choice (in addition to main) .
2. Upload algorithm and your source code (.py file) to this assignment for grading


Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

- plz write it pseudocodearrow_forwarddef print_num_pattern(num1, num2): if num1 <=0: print("0", end="") return print(num1, end="") print_num_pattern(num1 - num2, num2) print(num1, end="") if __name__ == "__main__": num1 = int(input()) num2 = int(input()) print_num_pattern(num1, num2)arrow_forwardAdd Fractions problem: create in a sandbox environment. Directions: In this program you will ask the user for 4 integers that represtent two fractions. First ask for the numerator of the first and then the denominator. Then ask for the numerator and denominator of the second. Your program should add the two fractions and print out the result. For example: a sample program run might look like this, Numerator One: 1 Denominator One: 2 Numerator Two: 2 Denominator Two: 5 The sum is 9/10 //remember if you have two fractions, the following formula should be used: a/b + c/d = (a*d +b*c) / b* d public class MyProgram { public static void main(String[] args) { //Ask the user for 4 numbers. (don't forget to import your Scanner class) //create your final numerator //create your final denominator //print out your result like the example abovearrow_forward
- P7arrow_forwardPhython assignment Exercise 1: Oreo cookies Check out the nutritional values of an Oreo cookie (Koppelingen naar een externe site.). Write code that does the following: calculate how much one Oreo cookie is concerning: calories, sodium, carbohydrate, fat create a user input that asks how much cookies you ate calculate how much calories, etc. you consumed warn the user that if he/she surpasses 2000kcal he/she should stop eating these darn delicious cookies use variables!arrow_forwardPython GUI tkinter: Write a program where the GUI display is My favorite soda is Coca-Cola. Whe the user clicks on soda, they have these following options in a menu: beverage drink refresher When the user clicks on Coca-Cola, the following are listed as menu options: Pepsi Mountain Dew Once a selection is made, the entire sentence changes. For example, the user selects beverage and Pepsi: My favorite beverage is Pepsi.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





