Write a program to simulate a simple calculator. In your program ask the user to enter an operation selected from the menu, ask for two operands. Calculate the result and display it on the screen. Here is a sample run

Answers

Answer 1

Answer:

Written in Python:

opcode = input("Enter operator: +,-,*,/")

operand1 = float(input("Operand 1: "))

operand2 = float(input("Operand 2: "))

if opcode == "+":

    print(operand1 + operand2)

elif opcode == "-":

    print(operand1 - operand2)

elif opcode == "*":

    print(operand1 * operand2)

elif opcode == "/":

    print(operand1 / operand2)

else:

    print("Invalid Operator")

Explanation:

This prompts user for operator

opcode = input("Enter operator: +,-,*,/")

The next two lines prompt user for two operands

operand1 = float(input("Operand 1: "))

operand2 = float(input("Operand 2: "))

This performs + operation if operator is +

if opcode == "+":

    print(operand1 + operand2)

This performs - operation if operator is -

elif opcode == "-":

    print(operand1 - operand2)

This performs * operation if operator is *

elif opcode == "*":

    print(operand1 * operand2)

This performs / operation if operator is /

elif opcode == "/":

    print(operand1 / operand2)

This displays invailid operator if input operator is not +,-,* or /

else:

    print("Invalid Operator")


Related Questions

Calculate the difference between the birthdate entered in cell C4 and the current date in cell C6. Insert this calculation in cell C14.

Answers

Answer:

In cell C14, input '= C6 - C4' formula to get the difference.

Explanation:

Spreadsheet applications are tools used for data analysis and collection. It has numbered rows or records, and columns or fields labelled alphabetically.

To get a location or a cell of information, the rows and columns label are used, like A1, B4, C7, etc. Formulas can be used in a cell, preceded by an equal sign.

The __________ IP address is the IP address of the local IP host (workstation) from which Wireshark captures packets.

Answers

Answer:

Source

Explanation:

Wireshark is a packet sniffing tool used by network administrators and hackers to monitor data transfer activities within a network.

The wireshark software captures packet in the network from the source workstation or host from which it runs.

Write the definition of a function that take one number, that represents a temperature in Fahrenheit and prints the equivalent temperature in degrees Celsius.

Answers

Answer:

Follows are the method definition to this question:

def Temperature(f):#defining a method Temperature that accept a variable f

   c= 5*(f-32)/9#use formula to convert Fahrenheit into Celsius

   print(c,"degree Celsius")#print Celsius value

f=float(input("Enter Temperature in Fahrenheit: "))#defining f variable for input the value

Temperatures(f)#calling the method

Output:

Enter Temperature in Fahrenheit: 104

40.0 degree Celsius

Explanation:

In the above-given code, a method "Temperature" is declared, that accepts an "f" variable in its parameter, and inside the method, a formula is used that converts a Fahrenheit into degree Celsius and use the print method to print its calculated value.

In the next step, an "f" variable is defined, which uses the input method to take value from the user and pass the value into the method.  

List five principles for an effective writing style in formal business documents.

Answers

Hola qué tal hi ajajjajajajajajajajajjaj jaajjajajajajajajajajajajajajajajjajaajjajajajjajajajjajajajajajaj

Write a program to compute the area of a circle some 'n' times. You must accept n and r from the user. Area is calculated using (22/7.0)*r*r - where r is the radius. Implement using value-returning functions. Hint: create a function to calculate area taking r as a parameter. In the main() function, ask for n and create a loop where you input r and invoke the area function n times.

Answers

In python:

def calculateRadius(r):

   return (22 / 7) * r * r

def main():

   quantity = int(input("How many times do you want to calculate the are? "))

   radius = float(input("What's the radius of your circle? "))

   i = 0

   while i < quantity:

       calculateRadius(radius)

       i += 1

if __name__ == "__main__":

   main()

I hope this helps!

How much internal fragmentation would you have - in paging Consume a page size of no bytes) ina a) the best case b) worst case c) average case

Answers

Answer:

Here is just the definition according to each circumstance.  

Explanation:

Best case:

OS Allocates the most acceptable lowest hole to something like the method throughout the best-fit system memory. Garbage becomes smaller in best-fit storage relative to some of the worst fit nor, first, match memory allocations.

Hence, response = n

Worst case:

OS Allocates the biggest void to something like the method in the worst-fit virtual memory which results in something like a huge amount of storage space being lost.

Hence, response = 2n

Average case:

OS allocates that the very first space to something like the processor that would be wide enough because the processor size is smaller than the first-fit memory space.

Therefore, response = ([tex]\frac{3}{2}[/tex])n

Are their ethical issues to consider when planning a database? For example, should personal data, such as medical information be stored in the same DBMS that manages employee salary and benefits data? Why or why not?

Answers

Answer:

Yes

Explanation:

When planning a database, we must actually consider legal implications.

Let's say, a database of salary and all benefits of every worker in a company. Every one who is a worker in this company, either senior or junior worker can access this information in this database.

But in a case of more personal information like medical information, it would be wrong to make it accessible to all who have access to the database. Because it may cause issues like misuse of personal informations of others. Such an information in the hands of a wrong person may be used against someone with serious health conditions.

If information are stored separately, then it won't be accessible by just anyone and it would be better for all workers as no one would possess any information he or she is not supposed to have.

discuss at least three artefacts of organizational culture

Answers

Answer:

Artifacts

Espoused Value

Shared Basic Assumptions

Explanation:

Artifacts are the overt and obvious elements of an organization. They’re typically the things even an outsider can see, such as furniture and office layout, dress norms, inside jokes, and mantras. Yes, foosball and free food are also artifacts. Artifacts can be easy to observe but sometimes difficult to understand, especially if your analysis of a culture never goes any deeper. The Palo Alto office of IDEO famously has an airplane wing jutting out from one wall, a surprising and puzzling artifact if one doesn’t understand IDEO’s culture of playful experimentation and free expression.

Espoused values are the company’s declared set of values and norms. Values affect how members interact and represent the organization. Most often, values are reinforced in public declarations, like the aptly named list of core values, but also in the common phrases and norms individuals repeat often. Herb Kelleher was famous for responding to a variety of proposals from Southwest colleagues with the phrase “low cost airline,” reaffirming the espoused value of affordability.

Shared basic assumptions are the bedrock of organizational culture. They are the beliefs and behaviors so deeply embedded that they can sometimes go unnoticed. But basic assumptions are the essence of culture, and the plumb line that espoused values and artifacts square themselves against. Zappos call center employees share a strong belief that providing outstanding service will result in loyal customers, so much so that employees send potential customers to other retailers if Zappos doesn’t have the item in stock. Basic assumptions manifest themselves in a variety of ways. Sometimes they’re reflected in the espoused values and in artifacts, sometimes not. But when basic organizational assumptions don’t align with espoused values, trouble arises. Enron produced a 64-page manual outlining the company’s mission and espousing its core values, but judging by their very “creative” accounting practices, it’s questionable if the executives at the top had ever read it.

Ed signed up for a weight-loss program. The table shows his weight in pounds in terms of the number of weeks since he began his weight-loss program. Assume that his weight loss is the same every week.

Time
(weeks) Weight
(pounds)
0 205
4 197

Eric also signed up for a weight-loss program. The function y = 200 − 1.5x represents his weight in pounds in terms of the number of weeks since he began his weight-loss program.
Of the two,
loses fewer pounds per week. When the two began their respective weight-loss programs,
was heavier by
pounds.

Answers

Answer:

Answer: of the two, Eric loses fewer lbs per week. When the two began their respective weight-loss programs, Ed was heavier by 5 lbs.

Explanation:

took a test and it was right

Answer:

1. Eric, 2. Ed, 3. 5

Explanation:

What theme is featured in Machiavelli's the prince

Answers

The descriptions within The Prince have the general theme of accepting that princely goals, such as glory and survival, can justify the use of immoral means to achieve those ends

Why is it good for companies like Google to test for possible collisions and related cyber attacks?

Answers

Answer:

Technology companies, like Google, constantly need to carry out tests and evaluations of their products that allow them to corroborate the security of their products, to avoid possible collisions or hacker attacks. This is so because when dealing with computer products, which in many cases store enormous amounts of information from their clients or users, they must guarantee their security to generate the trust of their clients, which in the end will end up being what maximizes their sales and earnings.

In other words, they must guarantee the safety of the user when using their products, which is precisely the reason why the customer purchases the company's product.

Good companies like   IT companies that need to carry out the tests to verify their integrity and authenticity. This allows them to collaborate and secure their user and provide possible solutions to their problems.

Encryption is one of the easiest and simplest methods of data protection from the collision of cyber attacks. These can be avoided if cyber security is enhanced by the use of tools and techniques so that threats don't collide.

Learn more about the companies like to test for possible.

brainly.com/question/13967762.

What is the best pokemon game?

Answers

Answer:

all of them

Explanation:

Answer:

i had the most fun playing omega ruby

Explanation:

Describe the mechanisms of ROT Cipher and Columnar Transposition. What can you do to break these ciphers?

Answers

The ROT cipher is a Caeser cipher where each letter is changed to its numerical value plus a pre-chosen number. This can be easily cracked using frequency analysis to determine how far the most common letters (like T or S or H) are being shifted. Columnar transposition can also be broken with a statistical method, but is much harder.

A station on a LAN that includes an attached bridge sends out a frame to a device that is not present on any of the segments of the total netowork. What does the bridge do with this frame

Answers

Answer:

Throughout the clarification portion following, the definition of the concern is mentioned.

Explanation:

You should conceive including its forwarding database as either a filtering application throughout the sense of a two-port network. A bridge recognizes the sequence number of a frame as well as chooses either to proceed or to filter. When another bridge decides that perhaps the intermediate node is on a whole other particular network, every frame is forwarded to a certain segment. The bridge filters the frame unless the destination mac address contributes to almost the same section as that of the destination host. The bridge maintains a scanning database of established MAC addresses as well as respective coordinates mostly on the platform, as nodes transfer data throughout the bridge. To decide whether such a document should be transmitted as well as filtered, the connection with the implementation existing filtering database.

Assume you have a data definition class called Account. You wish to create a specific type of account, called MoneyMarketAccount. Write the first line of code that will declare the MoneyMarketAccount class.

Answers

Answer:

It depends on the code that has to be used, but in general C++ and python are shown below.

Explanation:

for a .cpp code we have:

class MoneyMarketAccount: public Account

in a .py code in the console, the following part has to be added

class MoneyMarketAccount(Account)

What is the purpose of a macro in a word processor?
A.
to display keyboard shortcuts
B.
to determine typing speed
C.
to determine error rate
D.
to provide spelling suggestion

Answers

Answer:

B. to determine Typing speed

Explanation:

Macros are a program that detects patterns and sequences can can be used to reproduce them. For example how frequently keys are clicked. They store these type of information. Hope this helps!

What are two different types of data storage? Which do you think is best and why?
IN AT LEAST 3 SENTENCES

Answers

Answer:

cloud based and hardware

cloud is better because it can be shared virtually, don't have to physically keep track and it does not utilize memory/space on your computer

Explanation: look above

1.9 LAB: Input: Mad Lib
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.

Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story.

Ex: If the input is:

Eric
Chipotle
12
cars
Then the output is:

Eric went to Chipotle to buy 12 different types of cars

Answers

Answer:

I made one out your answers in comments i will put the story after. Put your description in comments. Pick only one word unless theres 2 cateories.

Explanation: Example : Names- john, Deon, Alex, Marcus

                                       Names- Lia, Stephanie, Mya, Jamacia

i chose Alex for this one.

Next.  Cars: Corvet, Audi,

Pick a noun. (Name)  girls- (lexi, Sophia, kenzie, maddison)

                    (Name)  boys- ( Logan,Joshua,caleb, preston)

pick an action  (jump, dance, walked)

Pick an adjective (color or texture.) pick from this Colors-  (blue, pink, red) Textures- (fluffy, hard, soft)

pick an adjective  (color or texture.) Textures- (Smooth, bumpy, worn out.)

Colors- Black, gray)

Pick a noun: Places: School, house, Mcdonalds, chipotle

Choose a number 1- 20

Choose a noun. Things: Robot, tv, phone, door knobs, flowers

The input() function could indeed insert a value in a program by one user. Returns the value of string input(). The components for input can be converted with just about any type of information. Users could indeed convert a user's value into a floating number for example.

Program Explanation:

In this code, four variables "name, location, number, and the noun" are declared that inputs value.Inside these variables, "number" is used for input integer value and other is used for the input string value.After input value, it uses the print method that prints the variable value with a message.

Program:

#defining variable that uses the input method to input value

name = input()#defining name variable to input value

location = input()#defining location variable to input value

number = int(input())#defining number variable to input integer value

noun = input()#defining noun variable to input value

print(name, 'went to', location, 'to buy', str(number), 'different types of', noun)# printing input value and print value with message

Output:

Please find the attached file.

Learn more:

brainly.com/question/14377991

how can i hide my browsing history from internet service provider??? for free:)​

Answers

There are several technologies to hide your browsing history from an internet service provider. The most private is the Tor Network. You can install it from the Tor Project (just search the web to find it). Alternatively, you can try a VPN (will probably cost money) or a proxy (many are free, but often poorer quality).

Please mark as Brainliest!

answer:

yes! use any mobile vpn app (there are about 4 free ones) & that should block anyone including your internet service provider from knowing your location or what you do on your phone!

explanation:

hope this helped!

i answered your question & hope you have a great day!

pls give me brainliest <3

Since its inception, the Apple App Store has had 30___
downloads

Million
Billion
Trillion
Thousand

Answers

Answer:

Billion

Explanation:

Sum of three integers stored in the memory (a) Specify memory location using: [ la ] (b) Load immediate integer-1 to register: [ $t1 ] (c) Load immediate integer-2 to register: [ $t2 ] (d) Load Immediate integer-3 to

Answers

Answer:

#a) Specify the memory location [la]

la $s0, 0xFFFF0010

#b) Load immediate Integer-1 to register

li $t1, 1

#c) Load immediate Integer-2 to register

li $t2, 2

#d) Load immediate Integer-3 to register

li $t3, 3

#e) Store Integer-1 to memory

sw $t1, ($s0)

#f) Store Integer-2 to memory

sw $t2, 4($s0)

#g) Store Integer-3 to memory

sw $t3, 8($s0)

#h) Load Integer-1 from memory to Register

move $t4,$t1

#i) Load Integer-2 from memory to Register

move $t5,$t2

#j) Load Integer-3 from memory to Register

move $t6,$t3

#k) add the three numbers

add $t7,$t4,$t5

add $t7,$t7,$t6

#l) store the result of the addition again to memory

sw $t7, 12($s0)

#m) Load the result of the addition to register

move $t8,$t7

#sum

li $v0, 1

move $a0,$t8

syscall

Explanation:

Run the above code and you will get your perfect output.

3.8) BEST ANSWER BRAINLIEST
your answer will be reported if it is ridiculousWhich answer represents the highest layer that network engineers are mainly concerned with?


Transport Layer

OSI Layer

Application Layer

Network Layer

Answers

Answer:

Transport Layer

Explanation:

Transport layer

Explanation:

I can Guarantee the answer is transport layer on edge I just took the lesson

What makes decrease-and-conquer algorithms better candidates for dynamic programming than divide-and-conquer algorithms

Answers

Answer:

The definition including its situation in question is outlined throughout the overview section described.

Explanation:

Divide and Conquer:

By breaking the question across sub-problems, Divide and Conquer functions, iteratively conquering each sub-problem before integrating these approaches.

Dynamic Programming:

Dynamic programming seems to be a solution for addressing challenges with sub-problems that connect. Each sub-problem has only been solved the other day and the outcome of every other sub-problem becomes reserved for future comparisons in something like a table. Those other sub-solutions could be used to achieve the initial solution, although memorization becomes recognized as that of the strategy of preserving the comment section-problem solutions.

Here may be another distinction between divide as well as conquer as well as complex programming:

Divide and conquer:

Does more function and therefore has the additional time required on either the sub-problems. The sub-problems remain independent from each other in splitting and conquering.

Dynamic programming:

Helps to solve only until the sub-problems and afterward preserves that one in the table. Sub-problems are not autonomous in complex programming.

For which equation would x = 12 be a solution?

x + 12 = 30
15 + x = 15
x + 5 = 18
12 + x = 24

Answers

Answer:

12+x=24

Explanation:

Move 12 to the other side. 24-12=12

x=12

During the TCP 3-way handshaking process, each side of the communication randomly generates a sequence number, and then sends that random value in a message with the SYN flag turned on. If the sequence numbers were NOT randomly generated and each side had used sequence number 0 to start communication, what potential pitfalls would you expect

Answers

Answer:

Following are the solution to this question:

Explanation:

The handshake TCP 3-way is working as follows:

[tex]Client ------SYN-----> Server\\\\Client <---ACK/SYN---- Server\\\\Client ------ACK-----> Server\\\\[/tex]

In TCP, both parties monitor what they sent from a data packet. It turns out it was an overall byte count of all of the sent. Its recipient may be using the hash value of the opposite user to recognize the receipts, however, TCP is a bi-directional data protocol, that requires both sides to also be able to correctly send data. Its parties involved must create the ISN, but the data packet does not start at 0, and that both sides must accept the ISN of all the other party. It ISN starts with such a random supply voltage (immediate Sequence Number) because TCP is two-way communication, all sides can "talk" but must thus produce an ISN as the starting data packet randomly. Throughout the exchange, both parties must notify another party about ISN which they have started.

When a malicious attacker can not randomly select and configure the hash value appropriately, a TCP-session (that can be secure links to a business, shop, or some other commercial business) could be hijacked. That device has to count every byte of a stream sent for the initial random data packet. It could the network users in just three communications agree from each control message value.

A specific field of series and the identification number is contained for each section. During the first SYN sent to the server, the client selects the original hash value (ISN). The ACK database will add it to the proposed ISN or forward that on the SYN to a client to suggest its ISN (ACKs should remind the sender always of the next planned byte). For instance, whenever the number used for the previous link is the same, the ISN of a Client could be rejected, but that's not taken into consideration.

Its client's ACK typically acknowledges the ISN mostly on the server which maintains contact between these sides, as defined by the acknowledgment sector of the server, ISN + 1 mostly on the server. Realize that perhaps the three-way handshake does not send some information. This should be kept till a link is formed. Its 3-way handshake was its universal process for just a TCP connexion to still be opened. Oddly, the RFC doesn't insist on which communications start that way, particularly when setting certain scale reliability in the Header field (three additional controlling bits are accessible besides SYN and ACK and FIN) because TCP assumes that certain control bits would be used during the connexion establishment and release, but others mostly during transferring data, a great deal of damage could be caused by merely messing up the six scale reliability with crazy variations, especially SYN / ACK / FIN which needs, uses, and completes a link concurrently.

please help me out
Write an if structure that will determine if the character ch is neither a new line, space, nor a tab character.

Answers

In Java:

if (!Character.isWhitespace(ch)){

   System.out.println("ch is neither a new line, space, nor a tab character");

}

else {

   System.out.println("ch is a new line, space, or a tab character.");

}

Just put this if block wherever you need it.

What field in the IP header can be used to ensure that a packet is forwarded through no more than N routers

Answers

Answer:

The Time-to-live field

Explanation:

The time to live (TTL) is also the hop limit, it is a way of limiting the lifespan of data that is on a system or network. The TTL is set when a TCP packet has been sent. It is the number of routers that it can go through until the packet is gotten rid of or discarded. The Time to Live ensures that a packet is is forwarded through not more than N routers.

Computed tomography uses magnetic waves to capture the image.
True or False ?

Answers

Answer:

True

Explanation:

I did it

Answer:

False

Explanation:

What area of the SP 800-100 management maintenance model addresses the actions of the content filter described here?

Answers

Answer:

Security planning, risk management, change management and configuration management.

Explanation:

Note: This question is not complete. The complete question is therefore provided before answering the question. See the attached pdf for the complete question.

The explanation of the answer is now given as follows:

Management maintenance model is a model that assist in the successful management of operations. It is a model with techniques and clear guidelines meant to be employed for attaining the aim of the organization.

SP 800-100 maintenance model is a model that handles the 13th information security areas like security planning, configuration management, governance of information security, incidence response, performance measures, change management, risk management, and among others.

The area of the SP 800-100 management maintenance model which addresses the actions of the content filter described in the question are:

a. Security planning: The security measures put in place is the email content filter which helps to prevent the executable files from attaching to emails. It should be noted that the function of the Security Planning section of SP 800-100 is to serve as a strategic plan that employed to give support to the IT plans and objectives of Sequential Label and Supply Company (SLS).

b. Risk Management: This is because the SLS greatly assist in reducing an accidental execution of dangerous software due to its prevention of executable email attachments.

c. Change management: This monitors the performance of the system continuously without stopping.

It should be noted that there is a need for the configuration of the system to meet the security requirement and also the needs of the user at the same time in such a way that the performance of either of the two is not compromised.

The configuration should meet both security and user needs without compromising the performance of either.

To rename and save a document to OneDrive, you should use which option?

A: save
B: save as
I'm confused since both can let u rename but I can only pick one.

Answers

Answer:

Save as :)

Explanation:

Answer:

Download

Explanation:

I got the answer right on the exam

Other Questions
Form questions using inverted word order. Put the subject at the end.Pablo, la, cena, en, cafetera, ?, ( i rly dont know what order these words go in ) PLZ PLZ HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPWhich of the following features support Kuhls purpose of informing? Select all that apply.bolded wordsvacation pictureslabeled illustrationsheadings based on key details Explain the following quote in terms of situational irony: DANFORTH: I judge nothing (Miller 1296). Ill mark brainliest!Please help How does the physical environment of coastal Texas compare with that of the Mountain and Basin region? * Coastal Texas has more rivers. Coastal Texas has a higher elevation. The Mountain and Basin region has more agriculture. The Mountain and Basin region has long summers and warm winters. Please what is the answer Why do programmers use the Turtle Graphics Module in Python? To assign a value to a variable To draw on the screen or create images To evaluate mathematical statements To print strings and string literals Who do these people think they are? They come onto our land and want us to help them build all these structures and destroy our land. They make us speak another language and pray to another god. I dont think my people will like living this way.Who would have most likely been the speaker of the quote above?Spanish priestSpanish soldierNative AmericanSpanish explorer Michelle kayaked 3.22 miles on monday. She kayaked three more miles on tuesday than wendsday. She traveled one mile less on wendesday than she did on tuesday. How many miles did she kayak over the three days? PLEASE ANSWER QUICKLYWhat was one effect of the yellow fever epidemic described in The American Plague?Washington had to communicate more with Madison.Washington had to communicate more with Jefferson.Washington had trouble communicating with everyone.Washington began communicating better with everyone. Which of the following is not a location of a former Spanish mission?Cumberland IslandSavannahSt. Catherine's IslandValdosta Solve for the equation y. 3/2 y+12=7/5A) -320B) -32C) -80D) 320 what do points do on brainly You spin the spinner shown below once. Each sector shown has an equal area. What is P(beaver ) P(beaver)start text, P, left parenthesis, b, e, a, v, e, r, end text, right parenthesis? If necessary, round your answer to 2 22 decimal places. What does the solution of a linear inequality represent? HELP HELP HELP NOW PLEASEEEEEEE how could you increase the kinetic energy of a wagon without increasing its mass? Si al triple del cuadrado de un nmero se le suma siete veces el mismo nmero se obtiene por resultado 10. Cul es ese nmero? What was the unemployment rate during the Great Depression? Kana is a single wage earner with no dependents and taxable income of $205,000 in 2018. Her 2017 taxable income was $155,000 and tax liability was $36,382. Calculate Kana's 2018 income tax liability and the minimum required 2018 annual payment necessary to avoid any penalty. Round your answers to two decimal places. Click here to access the income tax rate schedules. Kana's 2018 income tax liability: $ Kana's minimum required 2018 annual payment necessary to avoid any penalty: $ A recipe calls for 3 cups of flour for 5 dozen cookies. how much flour is needed for 8 dozen cookies?