Question
A-Asking the user to pick a number between 1 and 20 and having the computer pick a number between 1 and 20 and telling the user if they won or lost
B- For finding the logic error in the program
C- For finding and fixing the logic error in the program
D- For finding and fixing the logic error in the program and including one full paragraph in your *.rtf file explaining the fix.
Below is the code
REM Guess a number between 1 and 5
[Start]
Answer$ = "Y"
DO WHILE Answer$ = "Y"
REM the statement below is the way the computer guesses a number
CompNum = INT(5 * RND(1))
CLS
INPUT "Guess a number between 1 and 5 "; NUM
IF (NUM < 1 OR NUM > 5) THEN
PRINT "That number is not between 1 and 5 "
GOTO [Start]
END IF
IF NUM = CompNum THEN
PRINT "Correct!!!"
PRINT
PRINT
ELSE
PRINT "Better luck next time"
PRINT
PRINT "I picked "; CompNum
PRINT
PRINT
END IF
INPUT "Would you like to play again "; Answer$
Answer$ = Upper$(Answer$)
LOOP
END
B- For finding the logic error in the program
C- For finding and fixing the logic error in the program
D- For finding and fixing the logic error in the program and including one full paragraph in your *.rtf file explaining the fix.
Below is the code
REM Guess a number between 1 and 5
[Start]
Answer$ = "Y"
DO WHILE Answer$ = "Y"
REM the statement below is the way the computer guesses a number
CompNum = INT(5 * RND(1))
CLS
INPUT "Guess a number between 1 and 5 "; NUM
IF (NUM < 1 OR NUM > 5) THEN
PRINT "That number is not between 1 and 5 "
GOTO [Start]
END IF
IF NUM = CompNum THEN
PRINT "Correct!!!"
ELSE
PRINT "Better luck next time"
PRINT "I picked "; CompNum
END IF
INPUT "Would you like to play again "; Answer$
Answer$ = Upper$(Answer$)
LOOP
END
Answers
Question - write an algorithm to print the table of any number and also draw a flow chart .
Which answer this..........
Which answer this..........
Question - write an algorithm to print the table of any number and also draw a flow chart .
Which answer this..........
Answered reply ...........
Which answer this..........
Answered reply ...........
Related Questions
Topic- Each students will pick three things to write a consumer report on. It's your choice.
Comp...
A certain computer program lets the user pick a positive number, decreases the number by 60%, and di...
4 people pick some apples. They each pick the same amount. If they pick 10pounds in all, how many po...
Which number sentence shows how to find the number of blocks in each group?
Responses
24×2=...