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
bearhunter [10]
2 years ago
8

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

Computers and Technology
1 answer:
ozzi2 years ago
8 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
Write one line of code to print animals, an array of Animal objects.
oksian1 [2.3K]

Answer:

console.log(Animal);

Explanation:

The statement written above prints the array Animal which contains objects.There are two to three ways to print the array Animal in javascript. One of the method is written in the answer it prints the arrays in the console of the browser.

You can go to the console by pressing F12 and then clicking on the console.

Other methods to print are

  1. Simple write Animal after defining the array.
  2. Use alert.
  3. document.write()
7 0
2 years ago
A print server uses a print ________ as a software holding area for jobs waiting to be printed.
vichka [17]

Answer:

spooler

Explanation:

A print server uses a print spooler as a software holding area for jobs waiting to be printed.

8 0
2 years ago
Read 2 more answers
Copyrighted software illegally downloaded and sold by organized groups without a license to do so is called:
trasher [3.6K]
Copyrighted software illegally downloaded and sold by organized groups without a license is called Warez
5 0
3 years ago
How to make a Tip Calculator in code?
ki77a [65]
You should have the percentage of tip based on the service that you received.
Then you multiply the percentage of tip by the amount of money that you have to pay for what you bought.
4 0
3 years ago
What are some of the major issues with geotagging? What concerns you the most?
Finger [1]

Answer:

Major issues with geotagging include the ability to pinpoint the exact location where a photo was taken, which raises privacy concerns.

What concerns me the most is when a geotag of an unsuspecting victim's location falls into the wrong hands.

Explanation:

Geotag -  A geographical tag that can attach to SMS text messages, media such as photos and images, etc. The Geotag is measured in the longitude and latitude at which the image or text message took place.

4 0
2 years ago
Other questions:
  • What is the differnce between ''P4 and 4P''
    12·2 answers
  • Which layer includes the physical transmission medium (cables or wireless media) that any network must use to send and receive t
    8·1 answer
  • Why is the len ( ) function useful when using a loop to iterate through a stack?
    6·1 answer
  • As a digital strategist, Jared wants to add something extra to his ads to give users more incentive to click and convert. He's c
    11·1 answer
  • Dash transfers several bits of data together at one time<br>​
    6·1 answer
  • The Self-Quiz gives you an opportunity to self-assess your knowledge of what you have learned so far.
    13·1 answer
  • When creating a storyboard, in which section do you mention how you move from one shot to the next?
    8·1 answer
  • 1. What is the Internet?
    8·2 answers
  • What is operating system​
    10·2 answers
  • Answer all of the questions,
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!