Generate three random integers for the human player

Assignment Help Financial Management
Reference no: EM132382423

Question

First, generate a random integer in the range of 6 through 9. This will be the computer's pick. Then generate three random integers for the human player. These random integers are in the range of 1 through 10. If any of these three random integers is greater than the computer's pick, the human player wins the game. Otherwise, the human player loses. You must use a forloop to generate these three random integers. In each iteration, generate and display one random integer. If it is larger than the computer's pick, display "You have won the game" and break out of the loop. If the human player cannot get a random integer larger than computer's pick after three iterations , display "sorry you have lost the game".

Reference no: EM132382423

Questions Cloud

Personal expenses on the company financial : The chief executive officer (CEO) of ACME Manufacturing has decided to claim a portion of his personal expenses on the company's financial accounts.
Write a program that ask the user for the price of an item : Write a program that ask the user for the price of an item, and then prints out a bill for the item. The bill includes the item price, the sales tax on the item
What is the discounted payback period : What is the discounted payback period if the discount rate is zero percent?
What were the lessons learned : Discuss any instances where your company (or other person's company) was affected by a Cybersecurity incident, and how it was handled from a financial risk
Generate three random integers for the human player : Generate a random integer in the range of 6 through 9. This will be the computer's pick. Then generate three random integers for the human player.
What is the effective annual yield eay on investment : What is the effective annual yield (EAY) on this investment? (Answer as a percentage rounded to two decimal places without % sign. eg 2.889% would be written 2.
GMBA802 Know Your Organisation Assignment Problem : GMBA802 Know Your Organisation Assignment Help and Solution, Assignment - Case study, Assessment Help, Macquarie University, Australia
Interest paid on the deposit in bank : What account balance would Moira have at the end of the fifth year if she left all the interest paid on the deposit in each bank?
What is the value of the option to receive two payments : If you can earn 5.7% per annum compounding monthly on your monies, what is the value of the option to receive two payments (in present day value)?

Reviews

Write a Review

Financial Management Questions & Answers

  Foreign company acquisition

Acquisition by a foreign company and the effects of that decision and the results of foreign exchange in Euro and the exchange rate differences.

  Financial management for profit and non profit organizations

In this essay, we are going to discuss the issues of financial management in a non-profit organisation.

  Method for estimating a venture''s value

Evaluate venture's present value, cash and surplus cash and basic venture capital.

  Replacement analysis

This document show the Replacement Analysis of modling machine. Is replacement give profit to company or not?

  Business finance task - capital budgeting

Your company is considering using the payback period for capital-budgeting. Discuss the advantages and disadvantages of this technique.

  Analysis of the investment

In this project, you will focus on one of these: the additional cost resulting from the purchase of an apple press (a piece of equipment required to manufacture apple juice).

  Conduct a what-if analysis

Review the readings and media for this unit, including the Anthony's Orchard case study media. Familiarise yourself with the Anthony's Orchard company and its current situation.

  Determine operational expenditures

Organisations' behaviour is guided by financial data. In the short term, such data will help determine operational expenditures; in the long term, historical data may help generate forecasts aimed at determining strategic plans. In both instances.

  Personal financial management

How much will you have left over each half year if you adopt the latter course of action?

  Sources of finance for expansion into new foreign markets

A quoted company is considering several long-term sources of finance for expansion into new foreign markets.

  Long term financial planning

This assignment is designed for analyze Long term financial planning begins with the sales forecast and the key input in the long term fincial planning.

  Explain the role of fincial manager

This assignment explain the role of fincial manager, function of manger. And what are the motives of financial manager.

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