Write 4 version about the simulates the roll of a pair of dice (two dice) and calculates the probability that various number combinations will be rolled by using the “random”.
In this lab, you are going to investigate the properties of dice using a computer program. Python provides the “random” library. You can import this and then use:
The result will be between (and including) a and b. The exact details can be found at:
You are to design a program that simulates the roll of a pair of dice (two dice) and calculates the probability that various number combinations will be labelled.
Allow the user to enter a number. This is the number of times you will “roll” the dice. You will “roll” the dice in a loop and keep track of the number of times that various rolls occur. When the loop has completed your program should produce a table that shows the value of the roll accompanied by the number of times that It occurred, the percentage of the time that value occurred (number of occurrences divided by the total number of rolls). The final output might look like this:
total. iterations: leo number rolls percent
To create the table, you may find it helpful to use string
formatting… https://docs.python.org/3.4/libraryg.html#formatstrings o
Use this program to create a second program that works by randomly choosing a number between 2 and 12 instead of rolling the dice. Update the tables accordingly.
Note that rolling two distinct dice produces very different probabilities for each value than simply randomly getting a number between 2 and 12.
Now work out the probabilities for rolling any particular number and the probability that a randomly selected number will yield a given number between 2 and 12. Do this with pencil and paper.
Make copies of your programs. Using your calculated probabilities update the programs. This time your table should include a few extra columns. Add in the expected value (as per your calculation), a. the difference between the expected and the actual result. Your new table might look like this:
number rolls percent expected difference
2 90 .90 . 80 .10
Now produce a document that addresses the following:
Why Choose Us
At Myhomeworkwriters.com, we always aim at 100% customer satisfaction. As such, we never compromise o the quality of our homework services. Our homework helpers ensure that they craft each paper carefully to match the requirements of the instruction form.
Professional Academic Writers
With Myhomeworkwriters.com, every student is guaranteed high-quality, professionally written papers. We ensure that we hire individuals with high academic qualifications who can maintain our quality policy. These writers undergo further training to sharpen their writing skills, making them more competent in writing academic papers.
Our company maintains a fair pricing system for all academic writing services to ensure affordability. Our pricing system generates quotations based on the properties of individual papers.
My Homework Writers guarantees all students of swift delivery of papers. We understand that time is an essential factor in the academic world. Therefore, we ensure that we deliver the paper on or before the agreed date to give students ample time for reviewing.
Myhomeworkwriters.com maintains a zero-plagiarism policy in all papers. As such, My Homework Writers professional academic writers ensure that they use the students’ instructions to deliver plagiarism-free papers. We are very keen on avoiding any chance of similarities with previous papers.
Customer Support 24/7
Our customer support works around the clock to provide students with assistance or guidance at any time of the day. Students can always communicate with us through our live chat system or our email and receive instant responses. Feel free to contact us via the Chat window or support email: email@example.com.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Homework Writing Services
My Homework Writers holds a reputation for being a platform that provides high-quality homework writing services. All you need to do is provide us with all the necessary requirements of the paper and wait for quality results.
At My Homework Writers, we have highly qualified academic gurus who will offer great assistance towards completing your essays. Our homework writing service providers are well-versed with all the aspects of developing high-quality and relevant essays.
Admission and Business Papers
With Myhomeworkwriters.com, we will help you secure a position at your desired institution. Our essay writing services include the crafting of admissions papers. We will still help you climb your career ladder by helping you write the official papers that will help you secure a job. We will guide you on how to write an outstanding portfolio or resume.
Editing and Proofreading
Myhomeworkwriters.com has a professional editorial team that will help you organize your paper, paraphrase it, and eliminate any possible mistakes. Also, we will help you check on plagiarism to ensure that your final paper posses quality and originality.
My Homework Writers harbors professional academic writers from diverse academic disciplines. As such, we can develop homework writing services in all academic areas. The simplicity or complexity of the paper does not affect the quality of homework writing services.