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
Which of the following is NOT an example of editing?
Genrish500 [490]

Answer:

ang answer po at proofreading written

content

Explanation:

if I wrong please correction me!

8 0
2 years ago
in cell reference if you copy formula to another cell the cell reference to the formula will change according​
Grace [21]

Answer:

the type of reference

Explanation:

There are many cell reference types eg relative,absolute and mixed cell referencing. if you write your cell reference in relative type then it will change as you copy it to another cell. if you select absolute cell referencing then it will not change if you copy to another cell.

4 0
2 years ago
A program has a infinite while loop. How can you interrupt it?
MrRa [10]

Answer:

The <em>break</em> keyword is how you interrupt a while loop.

the syntax looks like this ↓

Python ↓

while <em>true</em>:

<em>break</em>

Java script ↓

while (<em>true</em>);

<em>break</em>

6 0
2 years ago
6 + 7 = 7 + 6 is an example of which property of addition?
Sauron [17]

Answer:

commutative

Explanation:

The commutative property states that the numbers on which we operate can be moved or swapped from their position without making any difference to the answer.

8 0
2 years ago
Read 2 more answers
Why do we have to watch a video to get answers?
IRINA_888 [86]

Answer:

The videos contain the answers.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What do students buy when they pay tuition?
    6·2 answers
  • Which of the following parameters should match in order for a pair of routers to form an adjacency when running OSPFv2? (Points
    9·1 answer
  • How do you know if a remote host is alive or not?
    5·1 answer
  • What is computer hacking? describe some examples
    6·1 answer
  • Question 4 (Multiple Choice Worth 5 points)
    6·1 answer
  • NoSQL is a programming language used to create mobile apps.<br> a) True<br> b) False
    13·2 answers
  • Of the various trends affecting the advertising and promotion industry, _____________ offers an opportunity for advertisers to d
    9·1 answer
  • Plz can someone tell me the answers ?
    13·2 answers
  • What is the maximum number of extended partitions can you have on a hard drive?
    14·1 answer
  • How does a security information and event management system (SIEM) in a SOC help the personnel fight against security threats
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!