1. Write three lines of code, each with a different error. Then, explain how to fix...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write three lines of code, each with a different error. Then, explain how to fix each one. 2. Is there an error in this program? If so, what is it, what type is it, and how would you fix it? def sum(num1, num2): return num1 + num2 print(sum("four", "five")) 3. What is wrong with this program, which will be part of an exercise app, and how would you fix it? print("Next, we'll do four push-ups.") for i in range(4): print("Do push-up #", i) 4. Describe five items that you would put into a software requirements specification if you were hiring someone to design an app to help museum visitors have a better experience. 5. Identify five errors in this program, which is supposed to take the average (mean) of three numbers: define average(one, two, three): avg one + two * three return aver print("The average of 6, 7, and 8 is:," average(6, 7, 8)) 1. Write three lines of code, each with a different error. Then, explain how to fix each one. 2. Is there an error in this program? If so, what is it, what type is it, and how would you fix it? def sum(num1, num2): return num1 + num2 print(sum("four", "five")) 3. What is wrong with this program, which will be part of an exercise app, and how would you fix it? print("Next, we'll do four push-ups.") for i in range(4): print("Do push-up #", i) 4. Describe five items that you would put into a software requirements specification if you were hiring someone to design an app to help museum visitors have a better experience. 5. Identify five errors in this program, which is supposed to take the average (mean) of three numbers: define average(one, two, three): avg one + two * three return aver print("The average of 6, 7, and 8 is:," average(6, 7, 8))
Expert Answer:
Answer rating: 100% (QA)
1 Code with error printHello world Error Missing closing quotation mark Fix printHello world Code with error x 5 y 10 Error Missing comma or semicolon ... View the full answer
Related Book For
Forensic Accounting
ISBN: 978-0133050479
1st Edition
Authors: Robert Rufus, Laura Miller, William Hahn
Posted Date:
Students also viewed these operating system questions
-
Visit http://www.swisswireless.org/wlan_calc_en.html and go to the Antenna section. Observe the dynamics between the signal frequency, antenna diameter, and antenna gain of a parabolic antenna. 1....
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Given the following data about XYZ Mutual Fund on Oct. 1: Assets: Liabilities: Cash = $40,000 Accrued fees and expenses = $5,000 1,000 Shares of Stock A: Closing Price $30 2,000 Shares of Stock B:...
-
After adjusting entries had been made, the balance sheets of Matuska Company showed the following asset and liability amounts at the end of 20x7 and 20x8: The following amounts were taken from the...
-
Doug Jones submitted his 2020 tax return on time and elected to file a joint tax return with his wife, Darlene. Doug and Darlene did not request an extension for their 2020 tax return. Doug and...
-
Using the variance data for Menounos Manufacturing Co., prepare an income statement through gross profit for the year ended December 31, 20Y6. Assume the company sold 3,000 units at $100 per unit.
-
Multiple Choice Questions 1. You are taking a multiple-choice test that awards you one point for a correct answer and penalizes you 0.25 points for an incorrect answer. If you have to make a random...
-
Given a public good with supply given by P = 2 + Q, and 4 consumers, each with demand of P = 15.5 - Q, find the optimal aggregate CS (Answer 1) and PS (Answer 2). Blank # 1 Blank # 2 A
-
Does training increase the emotional labor exhibited by employees during their performance?
-
What kinds of policies has the U.S. government pursued to encourage home ownership, and how do they achieve this goal?
-
What is Tobins q? How does it provide a theory of investment spending?
-
Why does structural unemployment occur?
-
What are the arguments for and against rules?
-
According to the Federal Reserve Act of 1913 (Section 13.3), In unusual and exigent circumstances, the Board of Governors of the Federal Reserve System, [] may authorize any Federal Reserve bank,...
-
According to one simplified model, the purchasing power of a dollar in the year 2000 + t is equal to P ( t ) = 0.68(1.04) t (in 1983 dollars). Calculate the predicted rate of decline in purchasing...
-
10m solution. If Ka(HA) = 10 then pOH of solution will be [Given : log4=0.6] (A) 6.7 (B) Greater than 6.7 & less than 7.0 (C) Greater 7.0 & less than 7.3 (D) Greater than 7.3
-
Review Rule 26(b) of the Federal Rules of Civil Procedure. Prepare a memo to your instructor outlining the rules of discovery for: a. Materials b. Experts c. Those claiming privilege
-
Discuss the types of investigative services provided by forensic accountants
-
Assume that a forensic accountant cannot identify a specific conflict of interest related to a potential engagement, but there is a chance that the engagement might create the perception of a...
-
In a recent study of how mice negotiate turns, the mice ran around a circular 90 turn on a track with a radius of 0.15 m. The maximum speed measured for a mouse (mass = 18.5 g) running around this...
-
It is well known that runners run more slowly around a curved track than a straight one. One hypothesis to explain this is that the total force from the track on a runners feet the magnitude of the...
-
You are driving your car through a roundabout that has a radius of 9.0 m. Your physics textbook is lying on the seat next to you. What is the fastest speed at which you can go around the curve...
Study smarter with the SolutionInn App