Question

1]How many elements are in the list quizScores? 1)quizScores.length() 2)quizScores.length 3)len(quizScores) 4)quizScores.num_elements ------------------------------------------- 2)A list has...

1]How many elements are in the list quizScores?

1)quizScores.length()

2)quizScores.length

3)len(quizScores)

4)quizScores.num_elements

-------------------------------------------

2)A list has the number of days in the month.

days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

How would I display the number of days in March?

Group of answer choices

a)days[3]

b)days[2]

c)days[4]

d)days['March']

----------------------------------

3)A dictionary is created with the number of days in each month.

days = {'Jan' : 31, 'Feb' : 28, 'Mar' : 31, 'Apr' : 30, 'May' : 31, 'Jun' : 30, 'Jul' : 31, 'Aug' : 31, 'Sep' : 30, 'Oct' : 31, 'Nov' : 30, 'Dec' : 31}

How would in display the number of days in June?

Group of answer choices

a)days[6]

b)days[5]

c)days['June']

d)days['Jun']

Homework Answers

Answer #1

1)Answer)

len(quizScores)

Reason : there is a function in python to find the size of the list.

/***************************************/

2)Answer)

days[2]

Reason : the index of the list starts from 0 to n-1

As the march is the 3rd month of the year,if we want to display the no of days in that list we have to use days[2]

/***************************************/

3)Answer)

days['Jun']

Explanation : If we want to display the value in the dictionary then we have to use the corresponding key.

As we want to display the no of days in the month of june , we have to use the key 'Jun'.So the answer is days['Jun']

/***************************************/

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Month time Sales Jan 1 200 Feb 2 203 March 3 210 Mar 4 218 April...
Month time Sales Jan 1 200 Feb 2 203 March 3 210 Mar 4 218 April 5 230 May 6 245 Jun 7 346 Jul 8 376 Aug 9 389 Sep 10 231 Oct 11 200 Nov 12 189 Dec 13 155 Jan 14 178 Feb 15 193 Mar 16 192 Apr 17 201 May 18 212 Jun 19 367 Jul 20 391 Aug 21 401 Sep 22 204 Oct 23 201 Nov 24 183 Dec 25 145 Jan 26...
Year Month Return Year Month Return 2006     Jan 3.95 2008     Jul 3.29 2006     Feb 3.77 2008...
Year Month Return Year Month Return 2006     Jan 3.95 2008     Jul 3.29 2006     Feb 3.77 2008     Aug 4.62 2006     Mar 5.29 2008     Sep 4.81 2006     Apr 3.77 2008     Oct 5.16 2006     May 4.47 2008     Nov 3.69 2006     Jun 5.2 2008     Dec 5.15 2006     Jul 3.9 2009     Jan 5.29 2006     Aug 4.33 2009     Feb 3.19 2006     Sep 4.41 2009     Mar 3.89 2006     Oct 5.14 2009     Apr 4.48 2006     Nov 3.24 2009     May 5.27 2006     Dec 4.13 2009     Jun 3.93 2007     Jan...
Rounded to the nearest whole number, what is the standard deviation for Google weekly closing prices...
Rounded to the nearest whole number, what is the standard deviation for Google weekly closing prices from December 12, 2008 to December 4, 2009?   4-Dec-09 585.01 27-Nov-09 579.76 20-Nov-09 569.96 13-Nov-09 572.05 20-Nov-09 551.1 30-Oct-09 536.12 23-Oct-09 553.69 16-Oct-09 549.85 9-Oct-09 516.25 2-Oct-09 484.58 25-Sep-09 492.48 18-Sep-09 491.46 11-Sep-09 472.14 4-Sep-09 461.3 28-Aug-09 464.75 21-Aug-09 465.24 14-Aug-09 460 7-Aug-09 457.1 31-Jul-09 443.05 24-Jul-09 446.72 17-Jul-09 430.25 10-Jul-09 414.4 2-Jul-09 408.49 26-Jun-09 425.32 19-Jun-09 420.09 12-Jun-09 424.84 5-Jun-09 444.32 29-May-09 417.23...
Consider a portion of monthly return data (In %) on 20-year Treasury Bonds from 2006–2010. Date...
Consider a portion of monthly return data (In %) on 20-year Treasury Bonds from 2006–2010. Date Return Jan-06 3.13 Feb-06 4.15 Mar-06 3.18 Apr-06 4.94 May-06 4.34 Jun-06 4.19 Jul-06 5.12 Aug-06 5.26 Sep-06 3.81 Oct-06 3.1 Nov-06 3.87 Dec-06 4.89 Jan-07 3.94 Feb-07 3.42 Mar-07 4.13 Apr-07 3.54 May-07 4.58 Jun-07 4.19 Jul-07 4.62 Aug-07 3.89 Sep-07 3.62 Oct-07 3.92 Nov-07 4.46 Dec-07 3.23 Jan-08 4.78 Feb-08 4.71 Mar-08 5.05 Apr-08 3.46 May-08 3.15 Jun-08 4.82 Jul-08 3.87 Aug-08...
FOR4. The Excel file Unemployment Rates provides data on monthly rates for 4 years. (8 pts)...
FOR4. The Excel file Unemployment Rates provides data on monthly rates for 4 years. (8 pts) a.         Develop 3- and 6-months moving average forecasts, and exponential smoothing forecasts (use alpha of your choice) b.         Using MAD as a criterion, explain which model yields better forecast? DATA: Unemployment Rates Year Month Rate (%) 2009 Jan 7.8 2009 Feb 8.3 2009 Mar 8.7 2009 Apr 9.0 2009 May 9.4 2009 Jun 9.5 2009 Jul 9.5 2009 Aug 9.6 2009 Sep...
Consider a portion of monthly return data (In %) on 20-year Treasury Bonds from 2006–2010. Date...
Consider a portion of monthly return data (In %) on 20-year Treasury Bonds from 2006–2010. Date Return Jan-06 5.39 Feb-06 4.83 Mar-06 5.41 Apr-06 4.64 May-06 4.05 Jun-06 3.41 Jul-06 3.92 Aug-06 3.46 Sep-06 5.06 Oct-06 5.44 Nov-06 4.96 Dec-06 4.17 Jan-07 3.48 Feb-07 4.7 Mar-07 4.38 Apr-07 3.82 May-07 4.19 Jun-07 4.35 Jul-07 3.83 Aug-07 5.42 Sep-07 3.29 Oct-07 4 Nov-07 3.42 Dec-07 3.24 Jan-08 5.21 Feb-08 4.84 Mar-08 4.59 Apr-08 3.82 May-08 3.61 Jun-08 4.34 Jul-08 4.94 Aug-08...
A local bookstore recorded their revenue (in thousands) for the last 36 months starting in September,...
A local bookstore recorded their revenue (in thousands) for the last 36 months starting in September, as provided below. a. find the deseasonalized line of best fit b. use the additive model of seasonal forecasting to predict the revenue for each month of the next academic year c. use the multiplicative model of seasonal forecasting to predict the revenue for each month of the next academic year d. what is the predicted total profit for the academic year for each...
Use the data below to answer this questions. a.) Generate a scatter of the data b....
Use the data below to answer this questions. a.) Generate a scatter of the data b. ) Report the monthly averages (January for all years, February for all years etc.) c.) Is there seasonality? Is there a trend? d.) How can you forecast the value for March 2020? Generate that forecast. e.) (Not technical) This forecast will for sure be wrong. Why? Reference period Employment 3 Persons Jan-01 1,879.50 Feb-01 1,901.00 Mar-01 1,925.30 Apr-01 1,914.60 May-01 1,961.50 Jun-01 1,960.60 Jul-01...
Rounded to the nearest whole number, what is the standard deviation for Google weekly closing prices...
Rounded to the nearest whole number, what is the standard deviation for Google weekly closing prices from December 12, 2008 to December 4, 2009? Use the data set Google Closing Prices.xlsx (in section 11 of this module) to determine your answer. NOTE: The standard deviation function in Excel (for recent versions) has .p for a population and .s for a sample. we're treating everything as a sample! 4-Dec-09 585.01 27-Nov-09 579.76 20-Nov-09 569.96 13-Nov-09 572.05 6-Nov-09 551.1 30-Oct-09 536.12 23-Oct-09...
1. Write a statement that assigns an empty list to the variable named empty. 2. Write...
1. Write a statement that assigns an empty list to the variable named empty. 2. Write a statement which assigns all the odd integer values between 0 and 10 (in order) to the variable named odds. 3. Write a statement which assigns the list of three-letter abbreviations of the months of the year to the variable months. That would be: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Capitalize correctly and have no punctuation. 4. Create...