Question: In the coding string integer playerScore integer computerScore for i = 1 ; i = 1 0 ; i = i + 1 integer playerSelection
In the coding string
integer playerScore
integer computerScore
for i ; i ; i i
integer playerSelection
integer computerSelection
playerSelection GetNextInput
computerSelection RandomNumber
if playerSelection and computerSelection
Put "Player wins this round!" to output
playerScore playerScore
else if playerSelection and computerSelection
Put "Player wins this round!" to output
playerScore playerScore
else if playerSelection and computerSelection
Put "Player wins this round!" to output
playerScore playerScore
else if playerSelection computerSelection
Put "It's a tie!" to output
else
Put "Computer wins this round!" to output
computerScore computerScore
end if
Put "Player score: to output
Put playerScore to output
Put
to output
Put "Computer score: to output
Put computerScore to output
Put
to output
end for
if playerScore computerScore
Put "Player wins the game!" to output
else if playerScore computerScore
Put "Computer wins the game!" to output
else
Put "The game is a tie!" to output
end if
I keep getting a the message "Line : In loop expression, unknown word i and im not sure how to fix this so it could work
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
