Question: 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'm having a hard time with this code I am also writing

I am also writing in python

in python now with this I dont know what is wrong and

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) in 1 #Write your code here ----> 2 roll_df[['rolls']] histo) NameError: name 'roll_df' is not defined **Question 5:** Plot default bins. 1 histogram using Matplotlib library to display the distribution of the value per move in Monopoly using In [16] : #Write your code here Question 6: Choose a custom bins range so that it displays best the frequency of each move value in 10,eee experiments. hint usings range with floating numbers 819 PM 3/11/2221 a O Type here to search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!