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
What does MMF2 use to measure an object's position in the play area?
DerKrebs [107]

Answer:

The X and Y coordinates of the object's hotspot

Explanation:

MMF2 is simply known in full as Multimedia Fusion 2, and it is a visual programming tool that was developed by the ward winning software development group known as Clickteam. The programing tool which was made after Multimedia Fusion 1.5 allows for the creation of applications and games.

The tool is built in such a way that the X and Y coordinates of the object's hotspot are rightly used to measure the position of an object in the play area.

3 0
3 years ago
The process by which information gets into memory storage is
Kay [80]

Answer:

That is the first step and it is called encoding process.

7 0
3 years ago
-----is a picture icon that is a direct link to a file or folder
Assoli18 [71]
No, it isn't because someone could get confused if they think that could lead them to like a profile or contact page. It's best to just have a separate link.
6 0
3 years ago
Read 2 more answers
If you write a toString method to display the contents of an object, object1, for a class, Class1, then the following two statem
kolezko [41]

Answer:

True

Explanation:

The two println methods are equivalent.

7 0
3 years ago
Can anybody give me any suggestions to what my pfp should be
Julli [10]

Answer:

— Your profile picture can be one of the most important elements of ... but your photo should give candidates a clear idea of what you'd ... They might also help to direct you a bit, like telling you to tilt your head slightly or tuck your ...

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • When you do not see any students while driving in a school zone, you should
    15·1 answer
  • Long distances are usually measured in kilometers.<br> T or F?
    8·1 answer
  • A device receives a Transmission Control Protocol (TCP) packet. The device understands where the actual data payload begins. Whi
    15·1 answer
  • A small business has suffered from a cyber attack, what could be the resultant damage​
    10·1 answer
  • Technician A says that high pressure in recycled refrigerant is only caused by air contamination. Technician B says that recycle
    15·1 answer
  • I.d 9934607467<br> p.a.s.s 54321<br><br> P.L.E.A.S.E J.O.I.N. Z.O.0.M. M.E.E.T.I.N.G
    10·1 answer
  • Create a public class Dog that stores a single double age set by the constructor. (Reject negative ages using assert.) Dog shoul
    13·1 answer
  • Bob has started a company and registered its name with the government as a private corporation. He tries to create a domain name
    12·1 answer
  • What was the worlds first coding language
    15·2 answers
  • When you insert a new slide in a presentation, where is it placed in relation to the existing slides?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!