Reference no: EM132522117
QUESTION 1
An online video streaming service has three different subscription packages for its customers: Package lite .$ 5 per month 5 hours of access are provided. Additional hours are $3.00 per hour. Package regular : For $15 per month 30 hours of access are provided. Additional hours are $2.00 per hour. Package unlimited For30 per month unlimited access is provided. Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (lite, regular, unlimited and the number of hours that were used. It should then display the total charges.
Description Modify the program you wrote for Programming Challenge 13
• so it also calculates and displays the amount of money lite Packagecustomers
• would save if they purchased Package regular or unlimited and the amount of money
• regular Package customers would save if they purchased unlimited Package. If there would
• be no savings, no message should be printed.
QUESTION 2
Write a program that plays a simple dice game between the computer and the user. It uses an unusual dice that has 12 sides, with numbers that start from 10. When the program runs, a loop should repeat 5 times. Each iteration of the loop should do the following:
o Generate a random integer in the range of 10 through 21. This is the value of the computer's die.
o Generate another random integer in the range of 10 through 21. This is the value of the user's die.
o The die with the highest value wins. (In case of a tie, you can randomly decide who wins.)
As the loop iterates, the program should keep count of the number of times the computer wins, and the number of times that the user wins. After the loop performs all of its iterations, the program should display who was the grand winner, the computer or the user.