Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm having a hard time with this code I am also writing in python now with this I dont know what is wrong and why
I'm having a hard time with this code
I am also writing in python
now with this I dont know what is wrong and why it's not running properly
kpoint Last Monday at 12:21 PM (unsaved changes) File Edit View Insert Cell Kernel Widgets Help Logout + Run >> wata TITTC Raw NBConvert Trusted Python 3 O In [12]: #Write your code here import pandas as pd roll_dict = [] num_exp = 10000 for i in np.arange(num_exp): rolls = np.random.choice(die, 2) outcome = np.sum(rolls) if outcome in roll_dict.keys(): roll_dict(outcome] += 1 else: roll_dict[outcome] = 1 roll_df = pd. DataFrame(list(roll_dict.items()), columns = ['outcome','frequency']) roll_df.head() Out[12]: outcome frequency 0 5 1 In [14]: #Write your code here Question 4: Plot a histogram using DataFrame function (hist() to display the distribution of the value per move in Monopoly using default bins. In [1]: #Write your code here roll_df [['rolls']] hist NameError Traceback (most recent call last)Step by Step Solution
There are 3 Steps involved in it
Step: 1
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