{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Computing apps notes 12

# Computing apps notes 12 - Weather In Malibu during month of...

This preview shows pages 1–6. Sign up to view the full content.

Weather In Malibu during month of November, each day has a 2% chance of rain, and 80% chance of sunshine, a 10% chance of fog, and an 8% chance of smoke. *rand() generates a value betwe simulate Malibu's weather for the Month of November Day Condition 1 Sunshine 0 Rain 2 Sunshine 0.02 Sunshine 3 Sunshine 0.82 Fog 4 Sunshine 0.92 Smoke 5 Sunshine 6 Fog 7 Fog 8 Smoke 9 Sunshine 10 Sunshine 11 Sunshine

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
een 0 and 1
Slot Machine A slot machine has the following symbol: cherries, lemons, grapes, bells, sevens. 30% of the symbols are cheeries. 40% of the symbols are lemons. 20% OF THE SYMBOLS ARE GRAPES, 5% of the symbols are bells and 5% are sevens. Three of the same symbol pays \$5. Three sevens pays \$1000. Each spin costs \$1.  Simulate the operation of this machine. Wheel 1 Wheel 2 Wheel 3 Money 0 Cherry Lemon Grapes Cherry (\$1) 0.3 Lemon Cherry Cherry Lemon (\$2) 0.7 Grapes Lemon Lemon Lemon (\$3) 0.9 Bell Cherry Grapes Lemon \$1  0.95 Seven Seven Cherry Grapes \$0  Grapes Lemon Grapes (\$1) Lemon Lemon Grapes (\$2) Grapes Cherry Lemon (\$3) Lemon Grapes Lemon (\$4) Cherry Grapes Bell (\$5) Seven Cherry Cherry (\$6) Cherry Lemon Lemon (\$7) Grapes Grapes Bell (\$8) Lemon Cherry Cherry (\$9) Grapes Bell Cherry (\$10) Cherry Grapes Grapes (\$11) Lemon Lemon Cherry (\$12) Lemon Lemon Bell (\$13) Lemon Grapes Lemon (\$14) Cherry Cherry Lemon (\$15) Cherry Cherry Lemon (\$16) Lemon Lemon Lemon (\$17) Lemon Grapes Lemon (\$13) Grapes Grapes Grapes (\$14) Lemon Grapes Lemon (\$10) Lemon Seven Grapes (\$11) Seven Grapes Lemon (\$12) Lemon Cherry Grapes (\$13) Cherry Seven Cherry (\$14) Lemon Lemon Lemon (\$15) Lemon Cherry Lemon (\$11) Cherry Grapes Cherry (\$12) Grapes Lemon Lemon (\$13) Lemon Grapes Lemon (\$14)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lemon Lemon Cherry (\$15) Lemon Lemon Lemon (\$16) Cherry Cherry Lemon (\$12) Cherry Lemon Grapes (\$13) Cherry Cherry Seven (\$14) Grapes Lemon Lemon (\$15) Seven Grapes Seven (\$16) Grapes Lemon Cherry (\$17) Cherry Lemon Grapes (\$18) Grapes Cherry Lemon (\$19) Lemon Lemon Grapes (\$20) Grapes Lemon Cherry (\$21) Bell Cherry Lemon (\$22) Lemon Lemon Grapes (\$23) Lemon Lemon Cherry (\$24) Cherry Lemon Grapes (\$25) Seven Grapes Grapes (\$26) Lemon Grapes Lemon (\$27) Bell Grapes Lemon (\$28) Cherry Lemon Lemon (\$29) Grapes Cherry Cherry (\$30) Lemon Seven Grapes (\$31) Lemon Cherry Grapes (\$32) Cherry Lemon Cherry (\$33) Lemon Lemon Grapes (\$34) Grapes Lemon Bell (\$35) Lemon Lemon Bell (\$36) Lemon Cherry Cherry (\$37) Lemon Grapes Cherry (\$38) Cherry Lemon Cherry (\$39) Cherry Cherry Seven (\$40) Cherry Cherry Lemon (\$41) Lemon Bell Grapes (\$42) Seven Grapes Bell (\$43) Lemon Grapes Lemon (\$44) Grapes Lemon Cherry (\$45) Cherry Lemon Seven (\$46) Lemon Lemon Lemon (\$47) Cherry Grapes Grapes (\$43) Lemon Seven Grapes (\$44) Lemon Cherry Seven (\$45) Lemon Cherry Cherry (\$46) Lemon Lemon Lemon (\$47) Lemon Lemon Lemon (\$43) Cherry Lemon Grapes (\$39)
Bell Grapes Lemon (\$40) Lemon Cherry Lemon (\$41) Cherry Seven Bell (\$42) Grapes Lemon Cherry (\$43) Grapes Cherry Lemon (\$44) Cherry Cherry Cherry (\$45) Cherry Cherry Grapes (\$41) Grapes Cherry Lemon (\$42) Cherry Lemon Grapes (\$43) Lemon Bell Cherry (\$44) Cherry Lemon Bell (\$45) Cherry Cherry Lemon (\$46) Cherry Grapes Lemon (\$47) Grapes Lemon Lemon (\$48) Seven Lemon Lemon (\$49) Cherry Cherry Lemon (\$50) Cherry Lemon Lemon (\$51) Cherry Lemon Lemon (\$52) Grapes

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}