Question: Purpose: Use data types/variables, various selection structures, random number generation, input/output, performing calculations and formatting output. Description: You have just been given the opportunity to

 Purpose: Use data types/variables, various selection structures, random number generation, input/output,
performing calculations and formatting output. Description: You have just been given the
opportunity to win prizes from a sweepstakes entry you made at the

Purpose: Use data types/variables, various selection structures, random number generation, input/output, performing calculations and formatting output. Description: You have just been given the opportunity to win prizes from a sweepstakes entry you made at the county fair! The opportunity includes winning 4 prizes, each will be determined by a different game of chance. You may create your own descriptions for the prizes and values as you like, just make sure they are patterned as follows. Each of these requires a random number generation. 1. Flip a coin: Depending upon the heads or tails result, you will get prize1: 1. Heads: A smartphone charger worth $9.99 2 Tails: A 9-volt battery and a wire worth $0.49 (the booby prize) 2 Roll a six-sided die: Depending upon the number that comes up, you will get prize2: 1. 1: A refrigerator magnet worth $1.49 2 2: A handy grocery bag worth $.59 (the booby prize) 3 3: A half-price ticket to next year's fair worth $4.00 4 4: A CD with hits from 12 bands playing at the fair worth $12.00 5. 5: A coupon for a free item at one of the concession stands worth $5.00 6 6: A stuffed animal penguin worth $8.00 3. Spin a roulette wheel: Depending on the color (red or black) and the number (1 to 100), you will get prize3: 1. Red doubles the prize, Black triples the prize 2 Spin 1-20: Earn a penny (the booby prize) Spin 21-40: Earn $4.00 Spin 41-60: Earn $1.00 5. Spin 61-80: Earn $2.00 Spin 81-100: Earn $3.00 Draw one card from a deck of 52: Depending on the number, suit, or face card, you will get prize4: 1. Suits (multiplier): Club (x1), Diamond (x2), Heart (x3), Spade (x4) 2. Numbers 2-10: Get a deck of cards worth $1.00 3 Number 11 (Jack): Get a game of jacks worth $.50 (the booby prize)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!