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
Please check my answer! (Java)
Nat2105 [25]

9 is the correct answer. 4*2=8 loops are executed, moving the count from 1 to 9.

8 0
3 years ago
his exercise creates a program to convert the temperature values form Fahrenheit to Celsius for a list of 10 temperature values
MissTica

Answer:

def fahrenheit_to_celsius(temperature):

   c = (temperature - 32) / 1.8

   return c    

temperature_list = [-10, -5, 0, 10, 20, 32, 40, 50, 60, 75.2]

i = 0

while i < 10:

   print(str(temperature_list[i]) + " degrees Fahrenheit = " + str(fahrenheit_to_celsius(temperature_list[i])) + " degrees Celsius")

   i += 1

Explanation:

*The code is in Python.

Create a function named fahrenheit_to_celsius that takes one parameter, temperature

Convert the temperature to celsius using the formula

Return the result of the conversion

Create a list holding ten temperatures

Create a while loop that iterates 10 times. Inside the loop, call the function to convert the each temperature in the list and print the result

5 0
3 years ago
Select the guidelines you should follow when creating a memo.
densk [106]

Answer:

Get to the point at the beginning of the memo.

Keep the paragraph lengths short.

At the end, inform the readers if there are specific actions they need to take.

Explanation:

6 0
3 years ago
What should you install in a server room that will save space by allowing you to control multiple servers with a single mouse, k
Nata [24]

Answer:

a KVM switch

Explanation:

KVM switch is devise used for handling or connecting different server at any time by using single mouse, monitor and keyboard. it is like an interface used to connect different server at any given time.

different type of KVM switch are

1) USB based KVm

2) Emulated USB type KVM

3) DDM USB type KVM

4) semi -DDM KVM

7 0
3 years ago
whats that system tool the rearranges files and unused space on the hard drive so programs can run faster
Zolol [24]
The Disk Fragmenter.
5 0
3 years ago
Read 2 more answers
Other questions:
  • Tonya is working with a team of subject matter experts to diagnose a problem with her system. The experts determine that the pro
    14·1 answer
  • Page No.:
    11·1 answer
  • What field in an IPv4 packet is altered to prioritize video streaming traffic over web surfing traffic?
    7·1 answer
  • Describe the positive and negative effects of Internet​
    6·2 answers
  • ____ occurs when two nodes simultaneously check a channel, determine that it is free, and begin to transmit.
    9·1 answer
  • Mika forgot to put in the function name in his function header for the code below. What would be the best function header?
    12·2 answers
  • Video is a medium that's looks real anyways, but is real________________.
    10·1 answer
  • In the Unified Process (UP) methodology, most of the Implementation activities occurs during the _____ phase.
    14·1 answer
  • Kenny FRIEND ME. Ps that is my brother
    9·2 answers
  • In _________, the process requests permission to access and modify variables shared with others. a) entry section b) critical se
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!