GAD225: HW 1
The first two should be solveable immediately, but the last 3 will require some stuff from week 2, so you'll have to either read ahead, or wait until next week to started on them.
 Write a program that uses a series of outputs to display ASCII art. Be creative. Your program's output should be better looking than my "Face" program!
 Write a program that prints out a traces out a series of lines that explains how to calculate the following 5 geometric result: area of a rectangle, perimeter of a rectangle, area of a triangle, area of a circle (you can use Math.PI for pi!), and circumference of a circle. Trace out both an equation showing how it is calculated, and an example calculation, for each one.

Generate three random numbers, for the following three variables: balance (Number), interestRate(Number), and minimumBalance (int).
balance should be some number between 0 and 10,000.
interestRate should be some number between 0 and 0.1
minimumBalance should be some int multiple of 100, between 0 and 5,000If the balance is less than minimumBalance, charge the user a $100 fee.
If the balance is at least twice the minimumBalance, double the interestRate.
Apply the interest rate to the balance.  Make a random number generator that simulates rolling 3 (6 sided) dice. Roll them once to determine your base number, and then print it out. Then roll them as many times as it takes to hit that base number again, printing out the total number of rolls. Also print out how many times you rolled higher than the base number, and how many times you rolled lower than your base number. NOTE: Matching your base number just means having the same total. I don't care what the actual dice show. A 12 is a 12.
 Let's make a dice check game. Rolling 3 6 sided dice again, let's roll until we have successfully rolled each possible result (318) at least once. Once this has happened, print out the total number of times each result showed up, as well as what percentage of the time each result showed up.
Tags: Actionscript, gad225, homework, principles of programming
April 21st, 2009 at 8:46 am
Hi Steve,
The final output line of
http://www.platypotamus.com/samplecode/actionscript/CoinFlipperLoop.as
doesn't seem to work.
Am I wrong?
Thanks,
Joel
April 21st, 2009 at 9:02 am
When I test it, it seems to work fine, what's it doing for you?