Highlights
Task
Your simulation has to do with a bottle of vitamin pills. The bottle of pills starts out with N pills. (More on N in a moment.) You need to take one half of a pill each day. Each day, you pull out a pill from the bottle. Assume that any pill is the bottle is equally likely to be selected. If you pull out a whole pill, then you break that pill in half, swallow one of the halves, and put the other half back in the bottle. If you pull out a half pill, then you swallow that half pill.
We are interested in tracking the ratio of half pills to all the pills left in the jar. When you start with a new jar of N whole pills, there are no half pills at all, so the ratio is 0/N. When you get down to the last half pill in the jar (and no whole pills), then the ratio is 1/1. In between, what does that ratio look like? You are going to use random simulation to find out.
Start with a full jar of all whole pills. (Perhaps you should use an array for this; each entry in the array would be able to record if a pill was a half or a whole pill.) Randomly pick one of the pills left in the jar. If that pill is a whole pill, change it to a half pill. If that pill is a half pill, then remove that pill from the jar. (Somehow that array entry should “disappear,” and the array should become shorter; there are different ways to do this.)
After each pill is chosen, determine the ratio of half pills to all pills. For a jar holding N whole pills, your simulation will randomly choose a pill 2*N times before the jar is empty.
Assume at first that your jar holds 50 pills. Fill up the jar with 50 whole pills, and empty that jar, keeping track of the ratio each time a pill is chosen. You should finish with an empty jar after 100 simulated days. Now do the same experiment 3 more times, yielding 400 data points.
Now take the average of the 4 data points on day 1, day 2, and so one for all 100 days. Now you will have 500 data points in 5 series.
Finally, do exactly the same thing, but this time use 100 pills. Again, do 4 repetitions, and then average.
CSC 540, HW3. EMPIRICAL DATA: Generating data with a Python program
HW3 is about generating empirical data using Python and the function given by the language for generating pseudo-random numbers. Choose one of the problems in the HW3 folder to work on.
There are many ways to generate empirical data. You can take a survey. You can do research that includes counting things that exist, for example, the number of websites that UIS maintains on its servers. (I'm told that number is now over a million.) You can also write a program that generates data; that's what you will be doing in this assignment.
Exactly what you need to do to generate your empirical data is specific to your individual assignment. However, some rules apply to all of you:
1. The generation and reporting of this data is supposed to be your work and your work alone. You are not allowed to work in teams, and you can't beg or hire help from anyone else to get it done. If you get someone else to do your work for you and you do not give them credit, then you are a plagiarist. If you copy someone else’s program, then you are a plagiarist. By now it should be clear that plagiarism is a major no-no.
2. If you incorporate other people's code or ideas into your code, then (just like in a written document) you must give credit to whoever provided that code in your code's comments. If you copy someone else's code and you do NOT give credit, then you have committed plagiarism.
3. Once you have generated your data, you will have may to report about that data in another homework assignment.
4. You must Python to generate your data for HW3. It is not acceptable to use some other programming language. You may decide to use a different language to develop your program, and then convert it to Python. I doubt that this will save you much time and effort, but you may do this if you’d like. However, it is your Python program that you will hand in and that I will grade.
For most of you, the description of your assignment will include some suggestions about how many times you should repeat your experiments.
The name and purpose of any files that your program uses is one of the things I will look for in the opening comments of your program. Other information there should include your name, the date, the name of our course, and a coherent explanation of what your program does. The program should include a significant opening comment, and useful internal comments.
Following this specification is a list of questions that will be used to grade your HW3 assignment:
Grading Questions for HW3
This CSC 540: IT Assessment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.