Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- random numbers m-programmer English
- easy way:((you don’t need anything, but, there is no way to prevent cheating):
- method_A_: just choose a number from 0 to 9
- method_B_: just choose a number from 0 to 127
- method_C_: just choose a number from 0 to 100
- method_D_: just choose a number from 1 to 10
- method_E_: just choose a number from 1 to 100
- write your result down on the variables paper L=result
- difficult ways:
- method_A_: from 0 to 9 (needs dice and coins)
- method_B_: from 0 to 127 (binary version, only needs coins)
- method_C_: from 0 to 100 (binary version1, the probability of 0 to 27 to come out will decrease, only needs coins)
- choose whichever you want between the following two;
- from 0 to 100 (binary version1, the probability of 0 to 27 to come out will decrease, only needs coins)
- or
- from 0 to 100 (binary version2(may take many tries),only needs coins)
- method_D_: from 1 to 10 (decimal version1, needs dice and coins)
- method_E_:
- choose whichever you want between the following two;
- from 1 to 100 (decimal version1, needs dice and coins)
- or
- from 1 to 100 (decimal version2, (6,8,9 and so on won’t come out, needs dice, the executor cannot cheat))
- write your result down on the variables paper L=result
- from 1 to 10 (decimal version1, needs dice and coins)
- roll the dice, if 6 comes out do it again.
- then, toss a coin, if it comes out tails then add 5 to the result
- from 0 to 9 (needs dice and coins)
- from 1 to 10-1
- from 1 to 100 (decimal version1, needs dice and coins)
- the result of from 0 to 9 X 1 plus
- the result of from 0 to 9 X 10 plus
- the result of from 0 to 9 X 100 plus
- from 0 to 127 (binary version, only needs coins)
- start with 0
- put 7 coins in a cup, then shaking the cup a lot, then drop them on the table, then lay them down in a line from left to right
- if coin #1 is heads, add 1
- if coin #2 is heads, add 2
- if coin #3 is heads, add 3
- if coin #4 is heads, add 8
- if coin #5 is heads, add 16
- if coin #6 is heads, add 32
- if coin #7 is heads, add 64
- from 0 to 100 (binary version1, the probability of 0 to 27 to come out will decrease, only needs coins)
- do from 0 to 127 and then if the result is more then 100 subtract 100
- from 0 to 100 (binary version2(may take many tries))
- do from 0 to 127 and then if the result is more then 100 repeat it.
- from 1 to 100 (decimal version2, (6,8,9and so on won’t come out, needs dice, the executor cannot cheat))
- 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