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]
2 years ago
7

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

Computers and Technology
1 answer:
sveta [45]2 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
3. An organization wants to use the private network number 192.168.90.0 across four subnets. The maximum number of hosts that ex
lesya [120]

Answer:

The correct answer is: 255.255.255.192.

Explanation:

A subnet mask complements an Internet Protocol (IP). Thanks to subnet masks IP addresses can be identified because they seem to be all the same but the subnet mask avoids confusion. If four subnets are to be created for the IP 192.168.90.0 3 bits of that IP must be used to create the subnet resulting in 255.255.255.192. Then:

  • <em>Number of subnets</em>: 2^{3} - 2 = 6
  • <em>Number of hosts per subnet</em> = 2^{5} -2  = 30
3 0
3 years ago
R15. Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an IP datagram sent f
maria [59]

Answer:

The answers are: an IP datagram, and 3 forwading tables.

Explanation:

An IP datagram sent from a source host to a destination host will travel through 8 interfaces. 3 forwarding tables will be indexed to move the datagram from source to destination.

8 0
2 years ago
(Find the number of days in a month) Write a program that prompts the user to enter the month and year and displays the number o
Gnoma [55]
It would be a table program. you can add a table and put your data into the table
6 0
3 years ago
Which type of button turns a feature on and off
densk [106]
D. Toggle
Toggle switches whatever the current control is.
8 0
2 years ago
A predictive data analyst ___
Arte-miy333 [17]

the answer is B because predictice means to infer


7 0
3 years ago
Other questions:
  • What is the maximum number of communication paths for a team of twenty people?
    5·1 answer
  • Digital dashboards provide the decision makers with a quick overview of key performance indicators and other key operational sta
    13·1 answer
  • ________ are used to translate each source code instruction into the appropriate machine language instruction.
    11·1 answer
  • Drag the correct type of update to its definition.
    14·1 answer
  • kieran wants to search a database quickly for information on the last time a patient came to his medical facility.The informatio
    14·2 answers
  • The I/O modules take care of data movement between main memory and a particular device interface.A. TrueB. False
    9·1 answer
  • Name TanushSAVAGE. As given in the picture, Subscribe!
    15·1 answer
  • Each contestant auditioned her singing voice for the pageant. Participle: Word it Modifies:​
    14·1 answer
  • What is output?
    10·1 answer
  • 3.5 lesson practice quiz Edhesive
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!