Question: Please do a new lab to me. I mean don't give me something you have already gave to someone else. Thanks CPS 180-Programming Assignment #4
Please do a new lab to me. I mean don't give me something you have already gave to someone else. Thanks CPS 180-Programming Assignment #4 Assigned: 05/24/17 Due: 06/01/17 Points: 40 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 prizel: a. Heads: A smartphone charger worth S9.99 b. Tails: A 9-volt battery and a wire worth S0.49 (the booby prize) 2. Roll a six-sided die: Depending upon the number that comes up, you will get prize2: a. 1: A refrigerator magnet worth $1.49 b. 2: A handy grocery bag worth S.59 (the booby prize) c. 3: A half-price ticket to next year's fair worth S4.00 d. 4: ACD with hits from 12 bands playing at the fair worth $12.00 e. 5: A coupon for a free item at one of the concession stands worth S5.00 6: A stuffed animal penguin worth S8.00 3. Spin a roulette wheel: Depending on the color (red or black) and the number (1 to 100), you will get prize3: a. Red doubles the prize, Black triples the prize b. Spin 1-20: Earn a penny (the booby prize) c. Spin 21-40: Earn S4.00 d. Spin 41-60: Earn $1.00 e. Spin 61-80: Earn $2.00 f, Spin 81-100: Earn S3.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
