Must be python format
Create a program which will choose a random number between 1 and 1000.
...
Computers and Technology, 18.11.2020 20:50 jeanine239
Must be python format
Create a program which will choose a random number between 1 and 1000.
Ask the user to guess at the number, and give the user feedback if their guess is too high or too low.
Also, keep track of the number of guesses that the user makes.
"Redirect" the user if they enter a number outside of the range of 1 to 1000, and the error should not count as one of their guesses.
When the user finally guesses the answer, congratulate them and inform them how many guesses it took them to arrive at the correct number. (and the program should end)
Much of this will be done using the WHILE command, and perhaps an IF statement.
(sample output of the program is below)
Guess a number between 1 and 1000? 500
Your guess is too low! Try a higher number.
Guess a number between 1 and 1000? 2000
Whoops, guess a number between 1 and 1000? 750
Your guess is too high! Try a lower number.
Guess a number between 1 and 1000? 625
Your guess is too high! Try a lower number.
Guess a number between 1 and 1000? 560
Your guess is too high! Try a lower number.
Guess a number between 1 and 1000? 530
Your guess is too high! Try a lower number.
Guess a number between 1 and 1000? 515
Your guess is too low! Try a higher number.
Guess a number between 1 and 1000? 520
Your guess is too high! Try a lower number.
Guess a number between 1 and 1000? 517
Your guess is too low! Try a higher number.
Guess a number between 1 and 1000? 518
You got it! The number is 518 and you got it in 9 guesses!
Answers: 1
Computers and Technology, 24.06.2019 06:30
Me and category do i put them in because this is science
Answers: 1
Computers and Technology, 24.06.2019 09:00
Why might you chose to crest a function resume
Answers: 1
Computers and Technology, 24.06.2019 18:00
Explain the circumstances for which the interquartile range is the preferred measure of dispersion. what is an advantage that the standard deviation has over the interquartile range? choose the correct answer below. a. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it increases as the dispersion of the data increases. b. the interquartile range is preferred when the data are not skewed or no have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. c. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it is resistant to extreme values. d. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it is resistant to extreme values. e. the interquartile range is preferred when the data are skewed or have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. f. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it increases as the dispersion of the data increases.
Answers: 2
Computers and Technology, 25.06.2019 08:40
Which of the following statements is incorrect in relation to processes: while, strictly speaking, at any instant of time, the cpu is running only one process, in the course of 1 second, it may work on several of them, giving the illusion of parallelism a process is just an instance of an executing program, including the current values of the program counter, registers, and variables processes can be created when an operating system is booted, created by the user, or a running process can create children processes there is a master process, which when started can last forever, and is not killable
Answers: 3
Mathematics, 17.08.2020 19:01
Physics, 17.08.2020 19:01
Biology, 17.08.2020 19:01
Mathematics, 17.08.2020 19:01
History, 17.08.2020 19:01
Mathematics, 17.08.2020 19:01
Social Studies, 17.08.2020 19:01
Mathematics, 17.08.2020 19:01
Mathematics, 17.08.2020 19:01
Mathematics, 17.08.2020 19:01
Mathematics, 17.08.2020 19:01