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
Can some give me engineers names that start with the letter A-Z
Nadya [2.5K]

Answer:

elon musk/ bill gates/ jeff bezos/ henry ford/ tim cook

Explanation:

i googled it/ i added more

6 0
3 years ago
Please answer fast as soon as possible.
zhenek [66]

Answer:

1. Scripts area is the main working area in Scratch.

2. Sensing blocks are color-coded light blue.

3. Adware is a malware which pops up a window, informing the user that the system is infected and asks for a fee to clean it.

4. Amaya is a WYSIWYG.

8 0
2 years ago
................njkkjjiooiuuuu
Damm [24]

Answer:

Cool

Explanation:

4 0
3 years ago
What is a feature of audio editing software
soldier1979 [14.2K]

I am pretty sure that Audio editing software is software which allows editing and generating of audio data. Audio editing software can be implemented completely or partly as library, as computer application, as Web application or as a loadable kernel module.

please mark brainliest

6 0
3 years ago
Write a C program<br>to convert entered number of days into<br>years,months and days<br>​
MaRussiya [10]

Answer:

#include <stdio.h>

#define DAYSINWEEK 7

 

void main()

{

   int ndays, year, week, days;

 

   printf("Enter the number of days\n");

   scanf("%d", &ndays);

   year = ndays / 365;

   week =(ndays % 365) / DAYSINWEEK;

   days =(ndays % 365) % DAYSINWEEK;

   printf ("%d is equivalent to %d years, %d weeks and %d daysn",

           ndays, year, week, days);

}

Explanation:

4 0
2 years ago
Other questions:
  • What is tuple and attribute of a relation​
    11·1 answer
  • You play guitar and keep two files on your computer. One file, called strings, lists the different brands of strings you keep on
    8·1 answer
  • Joe is a part of a team where the members come from various cultures and have different perspectives and viewpoints. What does J
    10·1 answer
  • In a batch operating system, three jobs are submitted for execution. Each job involves an I/O activity, CPU time and another I/O
    12·1 answer
  • A 9-year old male castrated Westie presents on emergency after being rescued from a house fire. On presentation, the dog has a r
    9·1 answer
  • After fixing the format of her subheadings, she notices that she misspelled the name of one of the famous people
    7·2 answers
  • Users can customize their Windows device by going to the Control Panel under __________.
    15·2 answers
  • Consider the following static method.
    9·1 answer
  • What is the output for the following program?
    6·2 answers
  • 1) Coding for Table in Html<br>​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!