Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

operation = * first_number = 4 second_number = 7 #You may modify the lines of code above, but don't move them! #When you Submit your

operation = "*" first_number = 4 second_number = 7

#You may modify the lines of code above, but don't move them! #When you Submit your code, we'll change these lines to #assign different values to the variables.

#You're doing your math homework when you realize, you can #write a program to do all the simple operations! # #The five possible values for operation are: # # - "+": Add first_number and second_number # - "-": Subtract second_number from first_number # - "*": Multiply first_number by second_number # - "/": FLoor-divide first_number by second_number (use //) # - "%": Find the remainder of dividing first_number by # second_number # #Your calculator should print the full operation according to #the following format: # #[first_number] [operation] [second_number] = [result] # #For example, for the initial values above, your calculator #would print: # #4 * 7 = 28 # #Notice that for division, we're asking you to use floor #division to avoid worrying about rounding errors.` # ##If the operation is not one of the five listed above, print #"That operation does not exist!"

Using python

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

Building The Data Warehouse

Authors: W. H. Inmon

4th Edition

0764599445, 978-0764599446

More Books

Students also viewed these Databases questions

Question

I am paid fairly for the work I do.

Answered: 1 week ago

Question

I receive the training I need to do my job well.

Answered: 1 week ago