Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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)
Step by Step Solution
★★★★★
3.52 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
It seems like theres an issue with your code related to a typo in the attribute name Inst...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started