Write a program that generates a random integer

Assignment Help Basic Computer Science
Reference no: EM13210231

Write a program that generates a random integer in the (inclusive) range [0-9] (i.e. the set {0,1,2,3,4,5,6,7,8,9}) and ask the user to guess what the number is . if the user's guess is higher than the random number the program should display, "Too high, try again" if the user's guess is lower than the random number the program should display, "Too low, try again" if the user wants to give up, he/she can enter a -1, in which case your program should display the correct answer and terminate. if the user wins, display the message, "you win!" You should also display the number of guesses that were made to win. Finally display the message, "please play again soon!"

Reference no: EM13210231

Questions Cloud

Difference between bourgeois and proletarians : What does it mean to say"Australia is a classless society" and explain the difference between bourgeois and proletarians and why it may be a key factor in marking boundaries of wealth.Is it still relevant today? Why?
Determine what was the inflation rate : Let's consider the effects of inflation in an economy composed of only two people: Bob, a bean farmer, and Rita, a rice farmer. Bob and Rita always consume equal amounts of rice and beans. In 2010, the price of beans was $1, and the price of rice w..
Compute the hypothetical retention times for caffine : Calculate the hypothetical retention times for caffine and aspartame if their retention factors were reduced by 28.0 %. Assume the mobile phase retention time (tm= 29.7 s) remains constant.
Explain the partition coefficient between ether and water : Extract a solute from 100 mL of water using only 300 mL of ether. The partition coefficient between ether and water is 3.0. Calculate q, the fraction of solute that would remain in the water under each of the following extraction conditions
Write a program that generates a random integer : Write a program that generates a random integer in the (inclusive) range [0-9] (i.e. the set {0,1,2,3,4,5,6,7,8,9}) and ask the user to guess what the number is .
Compute the volume of 0.050m barium hydroxide : calculate the volume of 0.050M Barium Hydroxide solution that contains the same number of moles
Perspectives and emphases within cognitive psychology : What are some perspectives and emphases within cognitive psychology that are currently affecting educators' thinking about how to improve the teaching/learning process?
State the partial molar volumes of water and ethanol : The partial molar volumes of water and ethanol in a solution with x(H2O) = 0.40 at 25 degrees C are 16.9 and 57.5 cm^3/mol, respectively.
Compute the ionic strength of a solution : Calculate the ionic strength of a solution that is 0.05 mol/kg in Na3[Fe(CN)6](aq), 0.02 mol/kg NaCl(aq),

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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