Let's see what would happen if you made more bets. Define a function net_gain_red that takes...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Let's see what would happen if you made more bets. Define a function net_gain_red that takes the number of bets and returns the net gain in that number of one-dollar bets on red. Hint: You should use your wheel table within your function. [58]: def net_gain_red(n): n_bets-wheel.sample(n) return sum(n_bets.colum("Winnings: Red')) [61]: grader.check("q1_4") [61]: q1_4 results: q1_4 - 1 result: Trying: net gain red (10000) != net_gain_red (10000) Expecting: True **|*|*|*|*|* okokkkkkkkkkkkkkteste Line 1, in q1_40 Failed example: net_gain_red (10000) != net_gain_red (10000) Exception raised: Traceback (most recent call last): File "/opt/conda/lib/python3.9/doctest.py", line 1334, in run exec(compile(example.source, filename, "single", File "", line 1, in net gain red (10000) != net_gain_red (10000) File "/tmp/ipykernel_28/2942485380.py", line 3, in net_gain_red return sum(n_bets.colum( 'Winnings: Red')) File "/opt/conda/lib/python3.9/site-packages/datascience/tables.py", line 235, in _getattr__ raise AttributeError(msg) AttributeError: 'Table object has no attribute 'colum' Run the cell below a few times to make sure that the results are similar to those you observed in the previous exercise. [60]: net_gain_red(10) Let's see what would happen if you made more bets. Define a function net_gain_red that takes the number of bets and returns the net gain in that number of one-dollar bets on red. Hint: You should use your wheel table within your function. [58]: def net_gain_red(n): n_bets-wheel.sample(n) return sum(n_bets.colum("Winnings: Red')) [61]: grader.check("q1_4") [61]: q1_4 results: q1_4 - 1 result: Trying: net gain red (10000) != net_gain_red (10000) Expecting: True **|*|*|*|*|* okokkkkkkkkkkkkkteste Line 1, in q1_40 Failed example: net_gain_red (10000) != net_gain_red (10000) Exception raised: Traceback (most recent call last): File "/opt/conda/lib/python3.9/doctest.py", line 1334, in run exec(compile(example.source, filename, "single", File "", line 1, in net gain red (10000) != net_gain_red (10000) File "/tmp/ipykernel_28/2942485380.py", line 3, in net_gain_red return sum(n_bets.colum( 'Winnings: Red')) File "/opt/conda/lib/python3.9/site-packages/datascience/tables.py", line 235, in _getattr__ raise AttributeError(msg) AttributeError: 'Table object has no attribute 'colum' Run the cell below a few times to make sure that the results are similar to those you observed in the previous exercise. [60]: net_gain_red(10)
Expert Answer:
Answer rating: 100% (QA)
It seems like theres an issue with your code related to a typo in the attribute name Inst... 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
-
How does social constructionism elucidate the intricacies of knowledge production and the formation of subjective realities within diverse sociocultural contexts?
-
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...
-
1. Based on the information provided in the case below, what is the key strategic goal for Tim Hortons as of August 2014? It would be a year of dramatic change for Tim Hortons Inc. On August 26,...
-
Mr. Yap bought a bond having a face value of Php 1,000.00 for Php 970.00. The bond rate was 14% nominal and dividends were made to him semiannually for a total of 7 years. At the end of the seventh...
-
Find the wavelength of the K line in copper (Z = 29) if the wavelength of the K line in iron (Z = 26) is known to be equal to 193 pm.
-
Cumming Corp. issues a $ 6 , 8 0 0 , 0 0 0 , 5 % bond on 1 April 2 0 X 3 . At this time, market interest rates are in the range of 6 % . The bond had a 1 0 - year life from 1 April 2 0 X 3 , and paid...
-
The case of flow past a cylinder of infinite length normal to the axis was also studied by Stokes. In view of the 2D nature of the problem, it is more convenient to work in \(r, \theta\) coordinates....
-
One of the more closely watched ratios by investors is the price/earnings or P/E ratio. By dividing price per share by earnings per share, analysts get insight into the value the market attaches to a...
-
What is "Leveraging Customer Knowledge"? Identify two methods employed by companies to improve the availability and use of customer knowledge. (5 Marks) Compare the strategic role of brands for...
-
Launched in 1937, Krispy Kreme Doughnuts is a branded specialty retailer of premium doughnuts. Its Original Glazed doughnut is the firm's most recognizable product. However, Krispy Kreme's commitment...
-
Boric acid is used in carrom boards for smooth gliding of pawns because: (A) H3 BO3 molecule are loosely chemically bonded and hence soft (B) its low density makes if fluffy (C) it is chemically...
-
Explain the principle and activities of social media optimization (SMO)
-
What are the main reasons why customers venture online and how should marketers use this customer knowledge?
-
Explain the reasons for price transparency and marketing responses to this phenomenon.
-
Outline the changes from traditional mass communication to new communications models.
-
Summarize in one sentence how an online presence can be used to enhance brands.
-
In 2022, Chu Su-ling had net income of $117,500 and taxable income of $102,400. Her earnings included employment income and non-eligible dividends of $1,000 [actual amount]. Her employer deducted the...
-
What is a make-or-buy decision?
-
Your supervisor has asked you to research the following situation concerning Owen and Lisa Cordoncillo. Owen and Lisa are brother and sister. In May 2012, Owen and Lisa exchange business pickup...
-
In June of 2012, Maureen's house is vandalized during a long-term power failure after a hurricane hit the city. The president of the United States declares Maureen's city a disaster area as a result...
-
Sherry Hopson owns a retail family clothing store. Her store is located at 4321 Circle Drive, Houston, TX 77001. Her employer identification number is 95- 1234321 and her Social Security number is...
-
Continue with the case of Hindustan Lever Ltd. Analyse the news items to predict the future outlook of the company and to strategise its improvement. Attempt the following requirements towards this...
-
Form a small group. Concentrate on BSE Sensex companies and compile the voluntary disclosures made by each of them. Draft a crisp research paper highlighting your findings and use thereof to various...
-
Hassan Abu-Jihaad was convicted of disclosing national defense information and of providing material support to terrorist by a jury in the District Court of Connecticut. Abu-Jihaad moved for a...
Study smarter with the SolutionInn App