Write a program that plays a simple dice game

Assignment Help Programming Languages
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.

Reference no: EM132522117

Questions Cloud

HAT2001 Introduction To Hospitality and Tourism Assignment : HAT2001 Introduction To Hospitality and Tourism Assignment Help and Solution, Australian Institute of Higher Education - Assessment Writing Service
Ethics and sustainability assignment : Research recent news articles and other information about Westpac Bank - Your Code of Ethics for Westpac Bank must specifically address
Describe the requirements of ids in wireless network : Describe the Requirements of IDS in Wireless Network and Wireless Intrusion Prevention System - List some penetration testing techniques for wireless network
Summary and documentation assignment : Provide a general overview such that someone reading the summary would have an idea of what your project consisted - Marketing strategies/advertising visuals
Write a program that plays a simple dice game : 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
Calculate the planning materiality : Discuss results of the analytical procedures outlining six (6) potential problem areas (that is, where possible material misstatements in the financial report
How is a credit check in the advanced technology system : Critically evaluate the range of cultural, security, privacy and ethical issues facing individuals and organisations as a result of information systems
Calculate the profit for the year by marginal costing method : Calculate the profit for the year, By the absorption costing method,Explain the difference in profit if found, By the marginal costing method
Find how much manufacturing overhead was applied : Prepare journal entry to close the balance calculated in the previous requirement to cost of goods sold. How much manufacturing overhead was applied

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd