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
Write a new method in the Rectangle class to test if a Point falls within the rectangle. For this exercise, assume that a rectan
algol [13]

Answer:

Explanation:

The Rectangle and Point class is not provided in this question but was found online. Using that code as guidance I created the following method named contains. This method takes in a Point object and checks to see if the x-axis point is inside the parameters of the Rectangle class and then checks the same for the y-axis. If it is inside the Rectangle then the method returns true otherwise it returns false.

def contains(self, point):

       return self.width > point.x >= self.corner.x and self.height > point.y >= self.corner.y

7 0
3 years ago
Your boss has asked you to edit a document she just created. You want to be able to make suggestions to the document without dir
ycow [4]

Maybe fix the grammar first. Then give suggestions that are similar but not the same to what the boss wrote.

-hope this helped
4 0
4 years ago
Read 2 more answers
Algorithms may be inefficient when used by a human brain.Answers:a. Algorithms can take in a relatively small amount of informat
Flauer [41]

Answer:

The correct answer is d. Algorithms may be inefficient when used by a human brain.

Explanation:

This is a situation typical of algorithms, since in order for them to work perfectly, the participation of people who carry out the necessary tests is required for the new creation to be useful in a specific field. Algorithms are logical operations determined according to a pattern, but the functioning of the human brain is in many cases different from a simple algorithm, since it associates situations and, depending on their complexity, also solves them.

3 0
3 years ago
Read 2 more answers
A two part circular linked chain implementation of a queue
dem82 [27]

Answer:A) All other answers

Explanation:

Circular linked chain is the type of the linked list formed that has the first component attached to the last component and every other are connected consecutively .

The circular linked list which is in two section is implemented in the form queue by the methods such as the initializing the nodes and using them when there is the requirement of it or it can also keep the node for the future use.

6 0
3 years ago
To which category of software does Microsoft Works belong
puteri [66]

Answer:

c) Integrated

Explanation:

Integrated software are packages that has the functional capacity to perform the several tasks commonly performed by more than one productivity software application, such that those functions and capabilities are integrated into a single application, thereby making it possible for users to carry out required computer tasks, at a lower cost

Examples of integrated software include Microsoft Works, which includes a Word processing, spreadsheet, and database capabilities combined into one application

5 0
3 years ago
Other questions:
  • Write a program that reads a 4-bit binary number from the keyboard as a string and then converts it into decimal. For example, i
    11·1 answer
  • --- is a set of applications that manages the activities and resources of a computer.
    12·1 answer
  • Fill in the missing step in the following deadlock situation. Two users from the local board of education are each running a pro
    15·1 answer
  • Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
    13·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    7·1 answer
  • Questions to ask people on how corona has affected the religion sectors​
    10·1 answer
  • What are binary code​
    7·2 answers
  • Please help me to solve this fast please <br>​
    5·1 answer
  • Which search strategy explores nodes from the initial state as well as the goal state?
    10·2 answers
  • An organized file title helps save time locating files, communicates professionalism, and lets us know the file is most likely N
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!