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

  What is the present value of the free cash flow projected

What is the present value of the free cash flow projected during the next 3 years?

  What unethical act has joan committed

Joan is a senior accountant who recently agreed to give a professional review of the financial statements of Baker Consulting Inc.

  What continuously compounded return does an investor earn

The price of a 90-day Treasury bill is quoted as 10.00. What continuously compounded return (on an actual/365 basis) does an investor earn on the Treasury bill for the 90-day period?

  What would be the net return of your proposal

Rudy and Karyn come across an investment opportunity that offers them a guaranteed return. The couple is excited by the opportunity but they don’t have enough liquidity to put the cash forward the investment. How can you justify your proposal? What w..

  What is the value of gillette stock if firm cost of stock

What is the value of Gillette's stock if the firm's cost of stock is 8%? $15.07.

  Calculate the correlation coefficient for each portfolios

During the year ended 2014, the current BOJ 90-day Treasury bill rate stood at 4.5%. Hence, most investors believe that to optimize portfolios, an ideal combination of both stocks and bonds should be held. Calculate the correlation coefficient for ea..

  What is the equivalent simple interest rate for loan

A friend will lend you money at a continuously compounded rate of 7.0% per annum. What is the equivalent simple interest rate for this loan?

  What is the brazilian real and australian dollar cross rate

What is the Brazilian Real/Australian Dollar cross rate?

  Considering effect on npv of changing multiple parameters

If you analyze a project by considering the effect on NPV of changing multiple parameters, you would be employing which of the following methods?

  Calculate the firms tax liability using the corporate tax

Calculate the firm's tax liability using the corporate tax rate schedule given in the following Table . Round to the nearest dollar.

  What will the value future investment

What is the minimum number of years to reach the return goal and what will the value future investment ?

  Was the bond sold at a premium or discount and how much

A $500, 9% bond maturing on 10/1/20 is sold on 4/1/14. If the buyer desires 8%(2) on his money, what will he pay for the bond? Was the bond sold at a premium or a discount and how much?

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