subject

1) dice probability distribution simulation (30 points) function name: sim_dice parameters: none return: a dictionary with 6 elements: keys are integers 1 to 6, values are corresponding number of occurrence description: you roll the dice 10,000 times. each time you get one of six sides with a probability of 1/6. you need to generate the total number of occurrence for each side, store them in a dictionary as a returned value. hint: 1. this rolling is equal to choosing a number in [0,1) while dividing it into 6 sections: [0, 1/6), [1/6, 2/6), [2/6, 3/6), [3/6, 4/6), [4/6, 5/6), [5/6, 1) 2. you need to use random() to randomly generate a floating number between 0 and 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
You know the right answer?
1) dice probability distribution simulation (30 points) function name: sim_dice parameters: none r...
Questions
question
Mathematics, 26.08.2021 06:20
question
Chemistry, 26.08.2021 06:20
question
Spanish, 26.08.2021 06:20
question
Mathematics, 26.08.2021 06:20
question
Mathematics, 26.08.2021 06:20
question
Mathematics, 26.08.2021 06:20
question
History, 26.08.2021 06:20
question
Computers and Technology, 26.08.2021 06:20
question
Computers and Technology, 26.08.2021 06:20
Questions on the website: 13722363