Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of this programming assignment is to make a calculator in Python. Because this is the first assignment on using the selection control structure

The objective of this programming assignment is to make a calculator in Python. Because this is the first assignment on using the selection control structure (if statements), we will have to do the pseudocode, flowchart and Python code.Remember, aside from the addition of the if statements, most of this is the same as the projects you have done previously.Ask the user to specify two numbers (integer values) and an operation, a single character symbol, one of these characters (+,-,*,/,%). For the two numbers entered, perform the operation specified, and display the result. For example, if they user enters 5 and 7 and +, you would display "5+7=12". Alternately, if the user enters 2 and 6 and *, then you would display "2*6=12". Note: the % symbol represents "modulus" operation. If you haven't seen that before, it means the remainder after dividing the first number by the second. For example, 7%3=1, because 7 divided by 3 is 2 with a remainder of 1, so the modulus is the remainder, the value 1. Likewise, 28%5=3, because 28 divided by 5 is 5 with a remainder of 3, so the modulus is 3.Since we are comfortable doing assignments, let's polish it up this time and make it look professional. Include comments at the top of your Python code file with your name, the class, and a brief assignment description. Display a nice prompt message at the beginning of the program with the title and version.Comment your Python code appropriately.Before exiting, display a nice message that thanks the user for using your program.What to turn in:Pseudocode in a text documentFlowchart (preferably in .fprg or an acceptable alternative)Python code in a .py file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

What's your biggest insecurity?

Answered: 1 week ago