What is the value of k after the following algorithm has been executed? Justify your answer....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What is the value of k after the following algorithm has been executed? Justify your answer. What counting formula did you apply? k = 0; for it = 1 to 8 for i2 = 1 to 1 for i3 = 1 to 2 : for 10 =1 to ig k = k + 1; Q3. Which of the following statements are true? Justify your answers. Which counting principles did you apply? 1. A programmer wrote 690 lines of code in 14 days. There must have been at least 1 day when the programmer wrote 50 or more lines of code. 2. One must pick up at least 80 integers from 1 through 100 (both 1 and 100 are included) in order to be sure of getting one that is divisible by 5. What is the value of k after the following algorithm has been executed? Justify your answer. What counting formula did you apply? k = 0; for it = 1 to 8 for i2 = 1 to 1 for i3 = 1 to 2 : for 10 =1 to ig k = k + 1; Q3. Which of the following statements are true? Justify your answers. Which counting principles did you apply? 1. A programmer wrote 690 lines of code in 14 days. There must have been at least 1 day when the programmer wrote 50 or more lines of code. 2. One must pick up at least 80 integers from 1 through 100 (both 1 and 100 are included) in order to be sure of getting one that is divisible by 5.
Expert Answer:
Answer rating: 100% (QA)
Answer k 0 for i1 1 to 8 for i2 1 to 1 for i3 1 to 2 for i10 1 to ig k k 1 The counting formula for ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Python Question needed solving is at bottom #Function implementing the Extended Euclidean Algorithm import mathdef egcd(a,b): # b must not be zero otherwise the concept of gcd will fail #base case if...
-
At the moment t = 0 a particle leaves the origin and moves in the positive direction of the x axis. Its velocity varies with time as v = v0 (1 t /), where v0 is the initial velocity vector whose...
-
A quality control engineer studied the relationship between years of experience as a system control engineer and the capacity of the engineer to complete within a given time a complex control design...
-
Zachary and Carrie Sexton (the Buyers) were searching for a home in the Kings wood neighborhood of Atlanta, Georgia. The Buyers real estate agent learned that Russell and Linda Sewell (the Sellers)...
-
The standards for one case of liquid weed killer are: Direct materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 lbs. @ $ 6.00/lb. Direct labor . . . . . . . . . . . . . ....
-
What are the capabilities of online analytical processing (OLAP)? What is the value of this tool to business? Is OLAP much different from data mining and warehousing? Explain..!
-
An analyst must decide between two different forecasting techniques for weekly sales of roller blades: a linear trend equation and the naive approach. The linear trend equation is Ft = 124 + 2 t, and...
-
Cash Accounts Receivables Inventory Other Current Assets Total Current Assets Long Term Investments Balance Sheet The Company Inc. ($000s) 194,200 185,800 Accounts Payable 1,090,400 242,200 Short...
-
Read the most recent earnings press release and 10-Q and transcript of American Airlines most recent conference call. Summarize how American Airlines is performing and why, including discussion of...
-
Engulf and Devour, Inc., ("Engulf") has just announced an offer to acquire all of the shares of Generic Industries, Inc., ("Generic"). Engulf will pay 2 shares of Engulf stock for every share of...
-
Carney Co has three CGUs -X, Y and Z. On 1 December, Carney Co acquired a competitor, Wine Co with identifiable assets of $120 000, giving rise to $90 000 goodwill. Prior to the acquisition, the...
-
Determine the missing amount for each of the following: Assets Liabilities Owners' Equity $38,000 $45,000 $30,000 $22,000 $53,000 $32,000
-
High-employment deficit or surplus is: a. an extreme economic situation requiring emergency measures. b. the amount of deficit or surplus available when employment is at its approximately full...
-
According to a news source discussing foreign investment in Thailand, the exchange rate between the Thai baht (THB) and U.S. dollar has changed from 37 THB = 1 USD in September 2015 to 33 THB = 1 USD...
-
Question 2 For an n x n matrix A = form) via (aij)
-
Ann hires a nanny to watch her two children while she works at a local hospital. She pays the 19-year-old nanny $125 per week for 48 weeks during the current year. a. What is the employer's portion...
-
Clarita is a single taxpayer with two dependent children, ages 10 and 12. Clarita pays $3,000 in qualified child care expenses during the year. If her adjusted gross income (all from wages) for the...
-
Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2012. Their salaries for the year total $83,000 and they have taxable interest income of $4,000. They have no...
-
In the case considered in the question (14), show what the trajectory corresponds to in case the magnitude of acceleration is \(a=2 k \sqrt{1+\frac{t}{T}}\), where \(T=\) cost. Question 14 A particle...
-
The position vector along a trajectory expressed in terms of the scalar distance \(s\) from the origin is given by the relation \(\mathbf{r}=\mathbf{a} s^{2}+\mathbf{b} s+\mathbf{c}\), with the...
-
A particle is constrained to move on a circular guideway of radius \(R=3.00 \mathrm{~m}\), on which it can slide without friction, according to the motion equation law \(s(t)=k t^{3}\), with \(k=2.0...
Study smarter with the SolutionInn App