Question: Please help with this python code. 1. Dice probability distribution simulation (20 points) You roll the dice 10,000 times. Each time you get one of

Please help with this python code.

Please help with this python code. 1. Dice probability distribution simulation (20

1. Dice probability distribution simulation (20 points) 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 occurrences for each side, store them in a dictionary. For example: If you roll the dice 10 times. Assume the number of occurrences for each side is this: Then the output is: {1:3,2:0,3:2,4:1,5:1,6:3} Hint: This rolling is equal to choosing a random number in [1,2,3,4,5,6]. You need to use to generate an integer between 1 and 6 . 2. Sentence comparison (20 points) You receive two sentences as inputs from the keyboard and compare them. The output is the number of common unique characters in two sentences. It should be case insensitive. For example: sentence 1: "I like Python programming" sentence 2: "I like java" Then the output is: 6. (they are: i,1,k,e,a, and space). Hint: To convert a string to a lowercase string, use s.lower0 >x= 'HELLO' print(x.lower()) Hello

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!