1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mrrafil [7]
3 years ago
7

Write a calculator program that will allow only addition, subtraction, multiplication & division. Have the

Computers and Technology
1 answer:
sveta [45]3 years ago
5 0

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

operation = input("Which operation are you performing? (a/s/m/d) ")

if operation == "a":

   print("{} + {} = {}".format(num1, num2, num1+num2))

elif operation == "s":

   print("{} - {} = {}".format(num1, num2, num1-num2))

elif operation == "m":

   print("{} * {} = {}".format(num1, num2, num1*num2))

elif operation == "d":

   print("{} / {} = {}".format(num1, num2, num1/num2))

I hope this helps!

You might be interested in
100 POINTS + BRAINLYEST TO FIRST PERSON THAT IS CORRECT!!! Tomika wants to create a cell style for her workbook and share it wit
andrew11 [14]

Answer:

Go to the Home tab on the ribbon and the group Styles.

Left Click Cell Styles, then click New Cell Style and create the style.

To share it with other workbooks, use the Merge Styles function in the same group.

Explanation:

This info was for excel.

Please mark brainliest!

6 0
3 years ago
Read 2 more answers
Which type of firewall policy calls for a firewall to deny all traffic by default?
charle [14.2K]
Restrictive policy is a kind of policy calls for a firewall to contradict all traffic by default. The first rule denies all traffic on any service and using any port. To permit a specific type of traffic, a new rule must be placed ahead of the deny all rule. A firewall should enforce the overall policy recognized by the network administrator. Enforcement is controlled mainly over setting up packet filtering rules which is a rule base comprises a set of these rules. 
3 0
3 years ago
Technician A says that oil for the rod bearings comes from splash off the crankshaft. Technician B says that lubrication to the
worty [1.4K]

Answer: technician B

Explanation:

The oil is picked up from the oil pump though a pick up tube that is mounted on the oil pump. The end of the pick up tube sits in the oil at the bottom of the oil pan. The oil is then forced through holes that are drilled into the block. Those holes which are called (journals) lead to the main bearings,rod bearings,lifters, camshaft, ect..

7 0
3 years ago
Interactive sites where users write about personal topics and comment to a threaded discussion is
-BARSIC- [3]
Social media? is that what you were looking for?
6 0
3 years ago
Do all the countries have the same date format?
alexandr402 [8]
No they don’t have the same data format.
4 0
3 years ago
Other questions:
  • "Dean wants a quick way to look up staff members by their Staff ID. In cell Q3, nest the existing VLOOKUP function in an IFERROR
    10·1 answer
  • Attacker player X is standing still on a corner kick, as the ball is played, he jumps up with his arms flailing above his should
    8·1 answer
  • What is also known as a visual aid in a presentation
    8·2 answers
  • The length of a pencil would most likely be measured in:
    9·2 answers
  • What is the name of the program file that you can enter in the Windows search or Run box to execute Event Viewer? What process i
    12·1 answer
  • You turn your computer on and the computer will not boot up. What is something you should do to diagnose the problem?
    6·2 answers
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • Speed is how fast an object moves a certain distance within a length of time. How is speed calculated?
    14·2 answers
  • 2) A simple operating system supports only a single directory but allows it to have arbitrarily many files with arbitrarily long
    7·1 answer
  • How can a user access the Mailbox Cleanup tools?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!