CS Principles
This homework 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? Like the lecture
and in-class demo, it addresses the following learning objectives.
- I 1-4: The student will use programming as creative problem-solving tool by creating
and analyzing an artifact to test the "goodness" of AI's PRNG.
- II 7-9: The student will develop abstractions to represent and
simulate 2-sided and 3-sided "Coins". Procedures will be used in the
program to develop levels of abstraction.
- IV 15-16: The student will develop loop algorithms in pseudocode and in the blocks
language.
- V 19-20: The student will write a program, divided into
procedures, to implement their loop algorithms.
Can App Inventor Model a Fair Three-Sided Coin?
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.
Details
- 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 Report your results on your Portfolio pages. 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.
Getting Help
The TA is available to help you on this assignment between
9-10 PM on Tuesday and Thursday evenings in MCEC 136.
In Class on Friday
Don't forget the quiz on Friday. It will cover algorithms,
especially if/else and loop algorithms.