Posts

Showing posts from April, 2020

What my algorithm is supposed to do

Image
Goal: (what my algorithm is supposed to do) Guess the picture Steps: Set guess: 0 Set Randomnum= Random picture between 1 - 4   Repeat (Loop) until guess = randomnum Ask user: “Guess a picture between 1 - 4” Set guess = User Answer If guess = Randomnum Then Output:”You guess it!” Else  If guess > Randomnum Then Output: failed - try again Else Output: emit sound End if End if End Loop