What is the output? names = [ 'Gerry', 'Preet', 'Jimin', 'Susan' ] index = 0 while...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What is the output? names = [ 'Gerry', 'Preet', 'Jimin', 'Susan' ] index = 0 while index < len(names): if names[index] == 'Susan': break else: index += 1 print('Done') else: print (index) What is the output? names = [ 'Gerry', 'Preet', 'Jimin', 'Susan' ] index = 0 while index < len(names): if names[index] == 'Susan': break else: index += 1 print('Done') else: print (index)
Expert Answer:
Answer rating: 100% (QA)
The code you have shared is written in Python and seems to involve a list of names and a while loop ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
A child is on the outside edge of a merry - go - round that has a radius of 2 meters. If the child feels a centripetal acceleration of g , what is : ( a ) the angular speed of the child? ( b ) the...
-
a) For the logic circuit shown in Figure 1, you are required to: i) Write down the Boolean expressions for Do and D in terms of X, Qo and Q. (4 Marks) ii) Write down the Boolean expressions for Y in...
-
Based on your analysis of the Netflix Case, which of Porter's 5 competitive forces do you believe is the strongest force in the streaming industry and why? Please make sure to carefully justify your...
-
Do firms follow the same steps for impairment testing of finite- and indefinite- life intangible assets ? Explain.
-
In this chapter, you learned about equity financing and in Chapter 10 you learned about debt financing. You are evaluating the financial statements of a private company that is considering purchasing...
-
A large supply line has a steady flow of R-410a at 175 psia, 140 F. It is used in three different adiabatic devices shown in Fig. P7.101: a throttle flow, an ideal nozzle, and an ideal turbine. All...
-
An F-test with 12 degrees of freedom in the numerator and 6 degrees of freedom in the denominator produced a test statistic whose value was 3.42. The null and alternate hypotheses were H0: 1 = 2...
-
The GSS10SSDS includes a measure of highest educational degree completed (DEGREE). Test whether there is a significant difference between those with less than high school (coded 0) and those with a...
-
With specific reference to Butterworth's essay and to Kilgore's article, explain how sports rituals provide a space for both imposing and resisting terms for social order, especially around...
-
Worldwide, over a billion solder balls must be manufactured daily for assembling electronics packages. The uniform droplet spray method uses a piezoelectric device to vibrate a shaft in a pot of...
-
What are the standard project phases?
-
Sanjit's virtual IT team has been delivering software components faster than planned, but some team members disagree on a key quality issue. How can Sanji best handle this conflict? Hold a video...
-
Write two complex numbers z = a + bi and z2 = c + d with a, b, c and d not equal to 0 or 1 with a product of 4+221.
-
What is the firm's cost of debt? What is the cost of preferred stock for Natural Wonder Corp.? Cost of common equity (1) What is the estimated cost of common equity using the CAPM approach? (2) What...
-
I want three components for this exercise 1) a pre-negotiation plan 2) the contract negotiation 3) a post- negotiation assessment - 1. What were the terms of your final settlement ? 2. Were your...
-
Find the x-intercepts of the graph of the equation x + 4x + y+ 7y = 5
-
The moist weight of 0.15 ft 3 of soil is 18.6 lb. If the moisture content is 17% and the specific gravity of soil solids is 2.62, find the following: (a) bulk density. (b) dry density. (c) void...
-
Prepare a stock card using the following information A company is registered for GST which it pays quarterly, assume GST was last paid on the 30th of June 2019. It uses weighted average cost...
-
A periodic signal x(t), of fundamental frequency Ω 0 = Ï, has a period The signal x(t) is the input of an ideal low-pass filter with the frequency response H(jΩ) shown in...
-
The Pade approximant provides an exact matching of M + N 1 values of h[n], where M and N are the orders of the numerator and denominator of the rational approximation. But there is no method for...
-
The type of transient you get in a second-order system depends on the location of the poles of the system. The transfer function of the second-order system is and let the input be x(t) = u(t). (a)...
-
The table below lists the patients seen last month at Community Hospital with their age and cholesterol reading. Create a table using common age categories and these ranges for cholesterol. Community...
-
Decide whether the following statements have a positive or negative correlation: 1. Positive correlation 2. Negative correlation a. b. c d. e. People who suffer from depression have higher rates of...
-
1. Indicate whether a table or a graph is the preferred method of presentation in the following situations: a. Distribution by site, sex, race, and time period of all cancers in your healthcare...
Study smarter with the SolutionInn App