Create a single NOTEPAD or PDF file that restates the problem in your own words,
ID: 3887697 • Letter: C
Question
Create a single NOTEPAD or PDF file that restates the problem in your own words, specifies what input is needed from whomever is using the process, what output is expected, the step by step process (algorithm) to get the output from the input, and test data (input for which you know the expected output for each of the 3 problems given below. (Include all this information in one file) You should not write any code. Make sure the problem statement is in your own words and is descriptive enough so someone not reading the problem you were given will understand what is being done. Do not write any code.
Write a process that will generate a random whole number between 1 and 1000 inclusive. Then allow the user to make a guess. When the user’s guess matches the random number output a message stating that the user guessed the number. When the user’s guess does not match the random number, output a message that user’s guess is too low or too high and prompt the user to enter a new guess until the guess matches the random number.
Answer should be in this format:
Purpose:
Input Needed:
Output Expected:
Algorithm:
Test Data:
Explanation / Answer
ALGORITHM
step1: initialize randnum = random (1 to 1000)
Step2: while(True)
Step3: Display user to guess a number
Step4: input userGuess
step5: if userGuess == randnum
step6: then display You guesssed the number
Step7: break the loop
step8: else
Step9: if userGuess < randnum
Step10: then display Your guess is low
Step11: else
Step12: display Your guess is high
PLEASE RATE !!
Thanks !
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.