i alread got a quote
*** Programs that have syntax errors will automatically get a score of 0 CS115 INTRODUCTION TO COMPUTER PROGRAMMING Programming project #3 INTRODUCTION The goal of this programming assignment to enable the student to write a Python program that uses iteration and decision to solve a problem. 2. PROBLEM DEFINITION Write a Python program that is a Math tutor. When the program runs, it should do the following: In a loop that runs until quit is input by the user: a) Display a menu offering a user to choose one of the following: • addition, • subtraction, • multiplication, • division, • quit b) Read the user option from the keyboard c) Display a message asking the user to enter two integers d) Read the two whole (integers) numbers from the keyboard e) Display a message asking the user to enter the answer depending on the option f) Read the user’s answer from the keyboard. g) If option was addition, Add the two numbers entered by the user • Else if option was subtraction Subtract the second number from the first entered by the user • Else if option was multiplication Multiply the two numbers entered by the user • Else if option was division Divide the first number by the second entered by the user • Else if option was quit Display message thanking user for using the Math Tutor h) If not quit and result of computation equals user answer then Display message that answer is correct Else Display message that answer is incorrect and display correct answer. *** Programs that have syntax errors will automatically get a score of 0 USER STORIES – Read me Success path - Addition 1. The user runs the program and see the menu asking which type of math problem I want to try. 2. The user select addition. 3. The program then asks for the numbers to add together. 4. The user enters the two numbers. 5. The program asks for the answer to the addition problem. 6. The user enters the solution (it is correct) 7. The program responds that the user is correct in their answer. 8. The program displays the menu asking which type of math problem I want to try. Subtraction – Negative answer 1. The user runs the program and see the menu asking which type of math problem I want to try. 2. The user select subtraction. 3. The program then asks for the numbers to subtract from each other. 4. The user enters the two numbers (5 – 10) 5. The program asks for the answer to the addition problem. 6. The user answers -5. 7. The program responds that the user is correct in their answer. 8. The program displays the menu asking which type of math problem I want to try. Division – Divide by zero and recurring decimals 1. The user runs the program and see the menu asking which type of math problem I want to try. 2. The user select division. 3. The program then asks for the numbers to divide from each other. 4. The user enters the two numbers (10 / 0 ) 5. The program informs the user that you can not divide a number by zero. 6. The program then asks for the numbers to divide from each other. 7. The user enters the two numbers (1 / 3 ) 8. The program asks for the answer to the addition problem to 2 decimal places. 9. The user answers 0.33 10. The program responds that the user is correct in their answer. 11. The program displays the menu asking which type of math problem I want to try. *** Programs that have syntax errors will automatically get a score of 0 TESTING Your program needs to correctly execute all your test data and what is below. • subtraction: 2 – 3 ◦ the correct answer is -1, your program needs to handle when the 1st number is smaller than what is being subtracted from it. • Division: 10 / 0 ◦ This is not possible equation. • division: 1 / 3 ◦ Here the answer is a decimal 0.333 … Print and check the users answer to the solution to 2 decimal places. • Division: 5 / 2 • Division: 1 / 2 THE PYTHON PROGRAM The program should do what is specified in the PROBLEM section above. The program should have the following features: 1) The first few lines of your program should be comments that state ◦ the program name, ◦ the author’s (your) name, ◦ date the program is released, ◦ and a brief description of the main task performed by the program. 2) Your program should have meaningful variable names (names should not be single letter for example a is not a good name but firstNumber or firstNum is a good name). 3) There should be a comment on each major function point such as: variable declarations, input, start of if or elif or else, loop, calculation, output. NOTE: that is a comment on each group NOT for every line of code. *** Programs that have syntax errors will automatically get a score of 0 EXTERNAL DOCUMENTATION Type a report of your solution and save in a Word or PDF document. You should structure your document in four clear sections each with a subheading as follows: 1. PROBLEM DEFINITION The problem definition comes here. This is a summary of the PROBLEM section above. Do not copy the text that I have written. Rather, phrase the problem in two or three English sentences. 2. ANALYSIS Give the variables that you have identified to hold output data and say their purpose and the type of data (type of data means integer, string, floating point number, single character) for each variable. Similarly, give variables to hold input data and give their purpose and type of data. If any calculations will be performed, give variables to store results of formulas. Also give variables to hold constants. Give formulas to convert input data to output data using variable names that you identified. 3. DESIGN Give the algorithm in pseudocode form of the step by step statements to carry out the required programming task in English phrases. Explain the reasoning of the structure and logic of your program. You may use diagrams such as structure charts in addition to the pseudocode to present hierarchy and logic of your program. Pseudocode should not be in Python. Pseudocode should not be in essay form. Rather, it should be short phrases with indentation with a bias towards what the final program will look like. See page 165 in your book and the “Credit Limit” program in “PowerPoint slides and tutorials” on Blackboard for example of pseudocode of an algorithm involving a loop. 4. IMPLEMENTATION Write in essay form, a description of your implementation. Implementation details include the platform and programming environment used. (Note that platform means CPU/Operating System combo. Example of a platform is Dell Computer with Intel 8-Core 2.8GHz processor running Windows 10.) Give the name of the development environment that you used such as IDLE. How did you test your program? Give the data used to test the program. Did you encounter any unusual situations when running the program? Example of unusual encounters include the program crashing when a letter is entered where a number is required. SUBMISSION METHOD a) Upload to Blackboard a copy of your external documentation. b) Upload to Blackboard a copy of your program (the one generated by your editor saved with a .py extension). *** Programs that have syntax errors will automatically get a score of 0 You will click on the black words “Programming project 3” in the “Programming projects” area on Blackboard and then click on “Browse My Computer” then attach your external documentation document, again click “Browse My Computer” and attach the program before finally clicking SUBMIT. GRADING This program will be graded out of 100 points distributed as follows: External documentation 15 Style: comments, meaningful names, indentation 20 Program written to specification 25 Program works correctly 30 User Friendly interactions 10 *** A program that has syntax errors gets a 0/100 by default. *** ) ( *** A program submitted in a Word or PDF or image (photo) or ZIP/Archive or any format that cannot be immediately run gets a 0/100 . ***