Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- easy way:
- just pick a random number from 1 to 100 (but this method can be cheated)
- write L=the number you picked on the variables paper
- hard way:
- uncheatable random number generator from 1 to 100
- you need 2 players to play this game, the “player” and the “executor”
- the executor does everything except where it is mentioned that the player should do something.
- how to get a number from 0 to 50
- Random_Number_0_to_50:
- repeat until the result is not negative:
- -roll first dice multiply times 10 then add the second roll of dice
- -subtract 11
- -the player should write down the results of both dice rolls and save them for later
- -the executor should write down the hidden random number and keep it hidden until the game is over
- -be sure to record every pair of rolls of the dice and every hidden number for later verification
- how to get a number 0 to 100
- RandomNumberA is Random_Number_0_to_50
- RandomNumberB is Random_Number_0_to_50
- if RandomNumberB is 0 then change RandomNumberB to 1
- make Random_number_Zero_to_100 into RandomNumberA+RandomNumberB
- write down L=Random_number_Zero_to_100 on the variables paper
- after the game ends:
- repeat for every pair of rolls of the dice:
- repeat until the result is not negative:
- -first roll of dice written down by player multiply times 10 then add the second roll of dice
- -subtract 11
- if the number is equal to the hidden random number then the executor did not cheat, otherwise he cheated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement