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
-
Given the following data: Probability={0.60, 0.15, 0.10, 0.05, 0.05}; Investment={4, 48, 55, 85, 110}; and Net Cash Flow={-2.8, 20, 106, 365, 493}; determine the EMV, EPI, and Expected Cost
-
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....
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
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:...
-
Demetrius Carver hired an attorney to help him start Carver Repair Service Company. On March 1, Carver deposited $14,375 in a bank account in the name of the company. When the company paid the...
-
Jane and Blair are married taxpayers filing jointly and have 2022 taxable income of $107,000. The taxable income includes $5,000 of gain from a capital asset held five years, $2,100 of gain from a...
-
What distinguishes the money from the capital market?
-
On May 1, 2010, Newby Corp. issued $600,000, 9%, 5-year bonds at face value. The bonds were dated May 1, 2010, and pay interest semiannually on May 1 and November 1. Financial statements are prepared...
-
A hedge fund charges 1.5 plus 25%. A pension plan invests in the hedge fund. Plot the return to the pension plan as a function of the return to the hedge fund
-
Assume a company has only one service department and twooperating departments (A and B). The service department??s budgetedand actual fixed costs for the period were $100,000 and $110,000,respecti 2...
-
In September 2 0 2 4 , EastWest Airlines sells all of its available seats for travel from calgary to Ixtapa, mexico, during the months of December 2 0 2 4 and January and February 2 0 2 5 . Total...
-
The condensed statements of Independent Auto Inc. follow: Independent Auto Inc. Income Statement ( $ 0 0 0 ) For Years Ended December 3 1 2 0 2 3 2 0 2 2 2 0 2 1 Net sales $ 2 1 0 , 2 0 0 $ 1 9 3 , 4...
-
Badonsky Manufacturing needs to obtain a gear - cutting machine, which can be purchased for $ 7 5 , 0 0 0 . Badonsky estimates that repair, maintenance, insurance, and property tax expenses will be $...
-
A light aircraft is flying at a speed of 7 8 m / s . An airfoil at a specific section of its propeller is rotating at a speed of 1 5 4 m / s . The propeller rotation disk is perpendicular to the...
-
The system is engineered to transport eight diminutive items (refer to Figure 1) and to conduct an examination of each item individually with a camera to assess its quality. Table 1 presents the...
-
A firm with earnings of $500,000 has 100,000 shares outstanding, trading at $12 per share. The firm has $150,000 of free cash that management would like to disburse to shareholders in one of three...
-
President Lee Coone has asked you to continue planning for an integrated corporate NDAS network. Ultimately, this network will link all the offices with the Tampa head office and become the...
-
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...
-
Initially, a 200-gallon tank is filled with pure water. At time \(t=0\), a salt concentration with 3 pounds of salt per gallon is added to the container at the rate of 4 gallons per minute, and the...
-
You make 2 quarts of salsa for a party. The recipe calls for 5 teaspoons of lime juice per quart, but you had accidentally put in 5 tablespoons per quart. You decide to feed your guests the salsa...
-
Consider the epidemic model leading to the system in Expression (3.153). Choose the constants as \(a=2.0\) days \(^{-1}, d=3.0\) days \(^{-1}\), and \(r=1.0\) day \(^{-1}\). What are the eigenvalues...
Study smarter with the SolutionInn App