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
Artyom0805 [142]
3 years ago
8

Write a python code for a calculator

Computers and Technology
2 answers:
Bingel [31]3 years ago
8 0

Answer:

In this example you will learn to create a simple calculator that can add, subtract, multiply or divide depending upon the input from the user.

Explanation:

SIZIF [17.4K]3 years ago
4 0
I am sure you are using an editor but if doesn’t work you can search online python compiler .

Answer :

We know that a calculater should be able to calculate ( addition , subs traction, multiplication, division …etc)

# first takng inputs
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))

# operations
print("Operation: +, -, *, /")
select = input("Select operations: ")

# check operations and display result
# add(+) two numbers
if select == "+":
print(num1, "+", num2, "=", num1+num2)

# subtract(-) two numbers
elif select == "-":
print(num1, "-", num2, "=", num1-num2)

# multiplies(*) two numbers
elif select == "*":
print(num1, "*", num2, "=", num1*num2)

# divides(/) two numbers
elif select == "/":
print(num1, "/", num2, "=", num1/num2)

else:
print("Invalid input")
You might be interested in
Match the following
kakasveta [241]

Answer:

Eraser tool -removes the unwanted part of the drawing.

Row -horizontal space running from left to right.

Text -Primary component of a multimedia.

Drawing Area -Working are of ms point program.

I hope this helps!! Correct me plz if I'm wrong. If I'm right, could you mark me as brainliest?

8 0
2 years ago
In a Web-based database, middleware is used to transfer information from the organization's internal database back to the Web se
Viefleur [7K]

Answer: True

Explanation:

 Yes, the given statement is true that the web based database used the various types of database applications for transferring the information or data.

  • The web database applications are basically designed so that the users managed and easily access the information by using the internet.
  • It is works as the middleware form for transferring the data from the internal database of an organization to the web server and it is known as web page for the user interface.
  • We can store various types of business and also personal related data by using the web database.

4 0
3 years ago
Consider the following code:
weqwewe [10]

Answer:

252

Explanation:

I tested the code and it outputted 252

hope i helped :D

4 0
3 years ago
Document templates are available online.<br> True<br> False
k0ka [10]
True anything is available online.
6 0
3 years ago
Read 2 more answers
Whoever helps me with these questions i will help them with the same number of questions in any subject: 1. As the operations ma
mezya [45]
I'm going have to go with with 1.b and 2.d hope this helps and I don't need help right now.
6 0
3 years ago
Other questions:
  • I need an answer fast !!! (APEX)
    13·1 answer
  • Which port must be open on your router to allow you to upload device configuration and firmware updates using trivial file trans
    13·1 answer
  • Although some families have more resources than other families, there is always a limited amount of resources that families have
    15·2 answers
  • What is the term for an understanding about the processes that underlie memory, which emerges and improves during middle childho
    7·2 answers
  • What is the cffa act
    5·2 answers
  • What is the awnser ?
    11·1 answer
  • What direction would a sprite go if you constantly increased its x property? Your answer What direction would a sprite go if you
    7·1 answer
  • Write a function that dynamically allocates an array of integers. The function should accept an integer argument indicating the
    8·1 answer
  • Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
    10·1 answer
  • For a web application we associate a web server, for a mobile application we associate a mobile server. for a decentralized appl
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!