Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribedPlease 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago