 |
CPSC 110-08: Computing on Mobile Phones
Fall 2012
Modeling a Three-sided Coin
|
CS Principles
This activity addresses several ideas, including creativity,
abstraction, algorithms, and programming. It ask students to extend
the simulation experiment done in class to a 3-sided coin. How good
is App Inventor's PRNG at simulating a 3-sided coin? It addresses the
following learning objectives.
- 1: The student can use computing tools to create an artifact
- 9: The student can use models and simulations to raise and answer questions.
- 15-16: The student can develop and express algorithms in a language.
- 20: The programs can use abstraction (procedures) to manage complexity in a program.
Challenge Assignment (in class)
You should work with your Project-1 partner on this assignment.
Following the fair
coin experiment and using and building
upon the
source code for that experiment, write an app that helps you test
whether App Inventor's pseudo random number generator (PRNG) can
successfully model a fair 3-sided coin.
Background
A fair
three-sided coin is a coin that is thick enough that it lands
on heads, tails, and sides with equal probability. Here's what
one might look like (click to enlarge):
Requirements
- Coding. Modify
the the
source code for
the fair coin
experiment and use it to conduct a similar experiment on a
three-sided coin.
- Testing. Test your app to make sure it runs correctly.
- Experimenting. Use your app to perform an experiment that
answers the question "Can App Inventor model a fair 3-sided coin?".
- Tabulating Experimental Data. Gather and tabulate your experimental
data.
- Reporting Create a Portfolio page under notes or
miscellaneous to report your results. The page should include
- a description of how you modified the source code.
- a screen shot of the blocks you revised.
- a screen shot of your user interface.
- the data you gathered.
- your conclusion -- does your app show that you can model a fair 3-sided coin? Why or why not?