Write a calculator program that will allow only addition, subtraction, multiplication & division. Have the
user enter two numbers, and choose the operation. Use if, elif statements to do the right operation based
on user input.

Answers

Answer 1

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!


Related Questions

Which one Bc I’m struggling

Answers

14 is c and 16 a btw do you go to connection academy

Answer:

c

Explanation:

give some examples where military needs have influenced technological development

Answers

Answer:

Satellite Systems,

Autonomous Vehicles

function for cell range F1 to F5

Answers

Answer:

The correct answer to this question is given below in the explanation section.

Explanation:

An essential skill in Excel is to know how to determine the range of values in Excel for Excel users. Maybe you don't have time to waste sorting through rows and columns in order to find the lowest and highest values of sales, revenue, or other finance-related information, etc. The range in Excel, the difference between the highest and lowest value helps in making accurate decisions, forecasting, and budgeting.

To find the minimum and maximum, you can use the following functions.

To determine the range for Cell F1 to F5 is given below:

To find the minimum, you can use this function: =MIN(F1:F5)

To find maximum, you can use this function: =MAX(F1:F5)

If you want to find the highest and lowest values for the example sale amount, you can use the following formulas.

To find the lowest, you can use this function:=SMALL(F1:F5,1)

To find the next lowest, you can use this function:=SMALL(F1:F5,2)

To find the third-lowest, you can use this function:=SMALL(F1:F5,3)

To find the highest, you can use this function: =LARGE(F1:F5,1)

To find the next highest, you can use this function: =LARGE(F1:F5,2)

To find the third-highest, you can use this function: =LARGE(F1:F5,3)

what is the correct value of x in the equation 3=⅛×​

Answers

Answer:

x=24

Explanation:

3=1/8x

3*8 = 8(1/8)x  - multiply 8 on both sides to cancel the fraction

3*8 = x  - multiply 3*8 to get x

x = 24


State ONE (1) disadvantage of using computers to store and process
information.

Answers

Answer:

it can be hacked

Explanation:

there is always a chance for computer data to be hacked

Brenda typed a few lines on a word processor. She then pressed F7 key to proofread her file. What type of key did Brenda press?
OA. function
OB. alphabetic
OC. numeric
OD. punctuation
O E. control
Pls help

Answers

Answer:

Function key

Explanation:

Given

F7 Key

Required

What does it stand for?

On a computer keyboard, the F7 key is one of the function keys.

There are 12 function keys labelled F1 to F12, each of which have designated functions.

So, from the list of given options, option A answers the question.

Analyzing other options:

Alphabetic implies A - Z in upper and lower case

Numeric implies digits 0 to 9

Punctuation implies punctuation marks such as . , ; : etc.

Control implies the ctrl key

Answer:

aa

Explanation:

HELP!! I keep getting an EOFError on line 6 while trying to run my code in python.

my code-

line 1: num = int(input("Enter a number: "))

line 2: c=0

line 3: sum=0

line 4: while (num<100):

line 5: sum=sum+num

line 6: num = int(input("Enter a number: "))

line 7: c=c+1

line 8: print("Sum: " +str(sum))

line 9: print("Numbers Entered: "+str(c))

Answers

I'm almost certain you were getting an EOF error because you were asking for too much input. My code works for me. Best of luck.

Assume: itemCost = input(“Enter cost of item: “) Write one line of code that calculates the cost of 15 items and stores the result in the variable totalCost

Answers

itemCost = input("Enter cost of items: ")

totalCost = 15 * float(itemCost)

print(totalCost)

The first line gets the total cost of the item from the user. The second line calculates the cost of 15 of those items and stores that value in the variable totalCost. The last line is just to test that our calculation works. I hope this helps!

One line code that calculates the cost of 15 items and stores the result in the variable total cost is written below.

What is coding?

We connect with computers through coding, often known as computer programming. Coding is similar to writing a set of instructions because it instructs a machine on what to do. You can instruct computers what to do or how to behave much more quickly by learning to write code.

itemCost = input("Enter cost of items: ")

totalCost = 15 x float(itemCost)

print(totalCost)

The user is asked for the item's total cost on the first line. The cost of 15 of those things is calculated in the second line and is stored in the total cost variable. The final line merely serves as proof that our math is correct.

Therefore, the one-line coding is written above.

To learn more about coding, refer to the link:

https://brainly.com/question/29906210

#SPJ2

PowerPoint Online automatically saves your presentation to what Office Online application? OneDocument OneDrive OneNote OneWay

Answers

Answer:

OneDrive

Explanation:

OneDrive is Microsoft cloud storage service. so it makes sense it would save it their :)

Answer:One DriveExplination:

If a file is being downloaded from various computers and not just one network computer or server, it is being downloaded the _____ way.
B2C

B2B

P2P

P2B

Answers

I am pretty sure it’s B2B

Is this statement true or false? Factual data is always the best data because it is based on facts. true false

Answers

The answer is true do you want an explanation to go with the answer

Answer:

The statement is true

Explanation:

In order to sell a new product to a store owner, taking the store owner into trust is the most important stage. We must provide proper details and the proofs that our product will make his business more effective. All of the above statements are part of the deal and they can be used to assure the store owner that the product we are selling to him is trustworthy.  

What term is commonly used to refer to HTML formatting?

Answers

Answer:

<html> or </html>

BRAINLIESTTTT How does a project manager evaluate the scope of a project?

Determine the overall work that needs to be completed to deliver the desired product, service, or end result
Estimate some of the resources that are needed to deliver the desired product, service, or end result
Evaluate the time it will take to deliver the desired product, service, or end result
Guess how much money it will cost to deliver the desired product, service, or end result

Answers

Answer:

The first choice

Explanation:

I took the test and that was the correct answer

Hope it helped!

Serena is adding headers and footers in the Slide Master view using the Header and Footer dialog box What is not
an option on the Slide tab to be included in the header and/or footer?
Slide Number
O Date and Time
O Company Logo
O Don't Show on Title Slide

Answers

Answer:

NUMBER 3

Explanation:

Answer:

it is c

Explanation:

Select the correct answer. What do bureaucrats do on a wiki website? A. Settle disputes between users. B. Manage the wiki's infrastructure. C. Add or remove editors of a wiki. D. Assign or remove administrator rights on wikis.

Answers

Answer:D ,Assign or remove administrator rights on wikis.

Explanation:

Two forms of compression are lossy and lossless. State giving reasons which
would be the most suitable form of compression to use when transmitting:
(i) a draft manuscript for a book.
(ii) A video recording which you have made of the school play.

Answers

Answer:

(i) When transmitting a draft manuscript for a book, the lossless compression technique is most suitable because after decompression, the data is rebuilt and restored in its form as it was from where it originated

(ii) When transmitting a video recording which you have made of the school play, a lossy compression technique is most suitable because the large size of video files require the increased data carrying capacity which is provided by the lossy transmission technique. The quality of the video can be reduced without affecting the message intended to be delivered

Explanation:

What type of file format is PSD?

Answers

Answer:

PSD (Photoshop Document)

Explanation:

PSD (Photoshop Document) is an image file format native its one of Adobe's popular Photoshop Application. PSD files are commonly used for containing high quality graphics data.

Answer:

PSD (Photoshop Document) is an image file format native to Adobe's popular Photoshop Application. It's an image editing friendly format that supports multiple image layers and various imaging options. PSD files are commonly used for containing high quality graphics data.

Format Creator: Adobe Inc.

Explanation:

Another term that describes the preconditions and postconditions associated with a method is

Select one:
a. contract
b. rubrik
c. exception
d. outcome

Answers

Answer:

Answer option C: Exception.

Explanation:

Should be the correct answer.

the ____number system is base 10​

Answers

Answer:

The correct answer to this question is given below in the explanation section.

Explanation:

This is a fill-in-blank question.

The answer is:

The decimal number system is base 10.

In our everyday life, we use a number system that is a Base-10 system. As we know that the base-10 is known as the decimal system and this number has 10 digital starting from 0 to 9 such as:

0,1,2,3,4,5,6,7,8,9

We use this number system in our daily accounting and in daily life and it is a base-10 number system. This number system uses 10 as its base number so it is called a base-10 system. It is also called the decimal number system.

A ball is at rest on top of a roof of a car.

Answers

Answer:

When it is in frictional force or in the action of movement varies the speed and if it will stop

Explanation:

If a object is in action a out side force is needed to make it start or stop

today food is produced and transported all over the world. name some pros and cons of it.

Answers

Answer:

Waste and left

Explanation:

Pros: Widespread Food Variety, Larger Food Quantity

Cons: Extra Uses Of Non-Reusable Energy By Transport, Taxes

Now imagine that the smart watches have been purchased for all employees. A company wellness program has been set up to encourage employees to use their smart watches to monitor their fitness activities both in and out of the office. The company views this program as a success and wants to keep it running. You now need to consider how you will be able to maintain upgrades for this program.

Answers

Explanation:

Analyzing the scenario of the question above and the information about the success of the organization's wellness program, it is necessary that for the program to remain updated and bringing significant benefits to the company, project program management must be carried out, that is, control and maintenance of the variables that make up the program.

For this, it is necessary to analyze and develop effective management actions so that the program continues to achieve its goals. It is necessary to align the program's objectives to organizational planning, managing its life cycle, eliminating possible restrictions and finding solutions.

It is also necessary to include a management of the benefits of the program, the management of the stakeholders, etc., so that the program continues to have the results expected in the organization.

What techniques can be used to assess a product?

Answers

Answer:

well

Explanation:

When describing methods used to assess student achievement of the 1. Include sources of data, collection methods 2. State whether they are direct or indirect instruments. 3. Describe how data was analyzed and evaluated.

what are the parts of plants that store most stach ?
A. Roots, Leaves and Seeds
B. Seads, Roots and Leaves
C. Seeds, Roots and Tubers
D. Tubera, Seeds and Leaves

Answers

Answer: A. Roots, Leaves and Seeds

Explanation:

Starch is produced in plants through the process of photosynthesis. The energy that is gotten from the rays of the sun during photosynthesis is stored by plants so that they can use it later.

Plant store starch in the roots. An example is potato. Others store it in their leaves and seeds as well. Therefore, the parts of plants that store most starch are the roots, leaves and seeds.

The correct option is A.

Put the steps in order to produce the output shown below. Assume the indenting will be correct in the program.


5 2

5 3

8 2

8 3
plz help ill give brainliest

Answers

Answer:

for numB in [5,8]:

     for numA in [2,3]:

            print(numB, numA)

Explanation:

Looking at the given output it can bee sent that the first numbers are repeated twice consecutively and the second numbers in a sequence.

This means that nested loops are used.

Assuming that the indentation will be correct in the program

The code in squence is:

for numB in [5,8]:

     for numA in [2,3]:

            print(numB, numA)

Answer:

Line 1: for numB in [5,8]

Line 3: print (numB, numA)

Line 2: for numA in [2,3]

Explanation:

What is unique about a dual-axis chart?
O Data is coded with two different colors.
O Data is charted by two different types of data.
O The information on the axis has two different fonts.
x One set of data is shown two different ways

Answers

Answer:

B: data is charted by two different types of data.

Explanation:

Got it correct in edge.

Answer:

B) Data is charted by two types of data.

Explanation:

how do you make a triangle on art.kano.com

Answers

Umm, I guess you just try to do one? I don't know.. Sorry if I couldn't help out.

I believe you can do it!

Answer: I would watch a YouT-ube video on a tutorial on doing that

But i am pretty sure it involves coding

Explanation:

Only text values can be displayed as a part of <TD> and <TH> tags.
True or False? ​

Answers

Answer:

I'm not sure but I think its true

What tag works as a dictionary between text & computer bytes?

Answers

Answer:

Here is some python code

Explanation

Why is simplicity important in navigation design?
A. It provides users with more choices and control.
B.
It makes navigation easy to understand.
C.
It reduces the load on the user's memory.
D.
It makes the design more attractive.

Answers

I think it’s B.
Since it’s sometime easier to visually see something.
Other Questions
Correct the sentence she wantsHelp asap.Thank you.! Have to find x and y . Please help! All of the following are true of tofu EXCEPT-it is very difficult to cook correctly.-it is one of the least expensive soy products.-it has very little flavor, so it will require seasoning.-it is very versatile and can be used in many recipes. There are 60 students in the school band. 30% of them are sixth graders, 50% are seventh graders, and the rest are eighth graders. a. How many band members are sixth graders? b. How many band members are seventh graders? c. What percentage of the band members are eighth graders? Explain your reasoning. terms identify the type of web resource such as .com, .edu, and .org, are called? Please answer this quickly. I need help!!!! Can sum1 help me plz A square garden has an area of 53.29 square meters. What is the length of each side of the garden? 1) 3.8m 2) 7.3m 3) 13.3m4) 26.6m Multiple Choice1. Which of the following is true about the electric charges on the objects below? (1 point)O The ball on the right has a positive charge and the ball on the left has a negative charge.O The ball on the left has a positive charge and the ball on the right has a negative charge.The balls do not have any electrical charge.The balls both have the same electrical charge.ALL - fall in the thatDala... What is 50% of.......55 What is the measure of angle DEC? Please help! Find X: 5311060 When ur fam just don't trust u 4 some reason.Marty I need you to comment on this plz. the lenght of the floor is 32 m longer than its width and there is greater than 200 square meters. you will cover the floor completely with tiles. what will be the possible dimension of the floor? From EASTER 1916By William Yeats whats The definition of withstand Half of the moon is always lit except during an eclipse.True or false? The planning system employed by GOSPLAN in the Soviet Union:Question 12 options:A) caused the economy to be dramatically more efficient than in capitalist systems. Once the profit motive was removed the government planners could concentrate on what consumers really wanted.B) led to much higher productivity than in capitalist systems. This was due to superior utilization of raw materials in the production process.C) led to surpluses of grain that were exported to western countries.D) led to stagnating growth due to bureaucratic inefficiency and lack of a proper incentive system. How did England's power struggles between the Catholic Church and the state (King HenryII) lead to the Crusades in the Holy Land? Which of the following is true of a memoir? A reader must be able to finish the memoir quickly. All the events of the story must be true to life. A reader must be able to access each characters feelings. Someone help asapEnter the your answer in the box provided to fill in the black space that will make the equation true. ____(3 + 4) = 36 + 48 What is 160% of 40? Four students solved this problem and their work is shown below. Choose the student whose work is correct. Cam's work. 16 times 40 = 00 .00 + 640 = 640. Gitana's work. 1.6 times 40 = 00. 00 + 640 = 64.0. Naoko's work. 0.16 times 40 = 00. 00 + 640 = 6.40. Sanjay's work. 160 times 40 = 00. 00 + 6400 = 6400.