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 kind of java program runs within a java-enabled browser?
ankoles [38]
An applet.





_____________
5 0
3 years ago
What does CTR stand for?
ipn [44]

click through rate is the answer


6 0
3 years ago
Read 2 more answers
An engine you're servicing has electronically controlled cooling fans. Cooling fan 1 doesn't work but cooling fan 2 does. Which
Elanso [62]

It might because of many reasons:

  • Fan 1 is not connected to the Program (via Bluetooth, WIFI, or wired)
  • The code made to make Fan 1 start up has a bug or an error
  • Fan 1 has a hardware problem
  • Fan 1 is out of reach for the electronically controller to reach
  • Fan 1 is not connected to a power supply (tho)

<u><em>sorry if my answers don't help solve your problem </em></u>

4 0
3 years ago
Certain files, such as the ____ and Security log in Windows, might lose essential network activity records if power is terminate
Hoochie [10]

Answer:

The answer to this question is a. Event log

Explanation:

Event log in Windows is a comprehensive record of security,system and application notifications stored by the Windows and it is used by administrators to determine problems in the system and foretell issues that going to happen in future.

Operating system and the Apps use event logs to keep account of important software and hardware activity that administrator can use to correct issues with the operating system.

7 0
3 years ago
In poor weather , you should ___ your following distance.
svlad2 [7]

Answer:

lengthen

Explanation:

will take more time to stop on wet and slippery surfaces

3 0
3 years ago
Other questions:
  • Which of the following typically have the highest auto insurance premiums?
    14·1 answer
  • A ____ appearing in the main text of a document indicates a footnote or endnote.
    15·1 answer
  • Among the rights you have as a user of computing resources is the right to​ _______.
    12·2 answers
  • 1. Which of the following is not related to a buffer overflow? A. Static buffer overflow B. Index error C. Canonicalization erro
    10·1 answer
  • Given the scenario, before leaving the office, you ask the CIO to provide which formal document authorizing you to perform certa
    11·1 answer
  • There is a renewed focus among today’s parents on providing food to their family.
    6·1 answer
  • Why would a programmer use a flow chart? (Edge2020 Coding Critical Thinking Questions)
    9·1 answer
  • Write a recursive method called sumTo that accepts an integer parameter n and returns a real number representing the sum of the
    12·1 answer
  • In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional
    10·1 answer
  • Which of the following lines of code would reduce the player’s gold by 100 coins?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!