subject
Engineering, 06.11.2019 20:31 olejlund8073

This exercise focuses on while loops and random numbers. your program allows the user to play a game in which the program thinks of a random integer and accepts guesses from the user until the user guesses the number correctly. after each incorrect guess, you will tell the user whether the correct answer is higher or lower. your program must exactly reproduce the format and behavior of the logs in this document. the log below shows one sample execution of your program. first, the program prints an introduction in the form of a haiku. a haiku has 3 lines: one with 5syllables, the second with 7 syllables, and the third with 5 syllables. next, a series of guessing games is played. in each game, the computer chooses a random number between 1 and 100,inclusive. the game asks the user for guesses until the correct numberis guessed. after each incorrect guess, the program gives a clue about whether the correct number is higher or lower than the guess. once the user types the correct number, the game ends and the program reports how many guesses were needed

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
question
Engineering, 04.07.2019 18:10
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
You know the right answer?
This exercise focuses on while loops and random numbers. your program allows the user to play a game...
Questions
question
Mathematics, 17.10.2021 17:20
question
Mathematics, 17.10.2021 17:20
question
Mathematics, 17.10.2021 17:20
question
Mathematics, 17.10.2021 17:20
question
Chemistry, 17.10.2021 17:20
question
English, 17.10.2021 17:20
question
Mathematics, 17.10.2021 17:20
question
Business, 17.10.2021 17:20
Questions on the website: 13722363