Advertisement
amigojapan

random numbers m-programmer English

Mar 14th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. random numbers m-programmer English
  2.  
  3. easy way:((you don’t need anything, but, there is no way to prevent cheating):
  4.  
  5. method_A_: just choose a number from 0 to 9
  6.  
  7. method_B_: just choose a number from 0 to 127
  8.  
  9. method_C_: just choose a number from 0 to 100
  10.  
  11. method_D_: just choose a number from 1 to 10
  12.  
  13. method_E_: just choose a number from 1 to 100
  14.  
  15. write your result down on the variables paper L=result
  16.  
  17.  
  18.  
  19. difficult ways:
  20.  
  21. method_A_: from 0 to 9 (needs dice and coins)
  22.  
  23. method_B_: from 0 to 127 (binary version, only needs coins)
  24.  
  25.  
  26. method_C_: from 0 to 100 (binary version1, the probability of 0 to 27 to come out will decrease, only needs coins)
  27. choose whichever you want between the following two;
  28. from 0 to 100 (binary version1, the probability of 0 to 27 to come out will decrease, only needs coins)
  29. or
  30. from 0 to 100 (binary version2(may take many tries),only needs coins)
  31.  
  32. method_D_: from 1 to 10 (decimal version1, needs dice and coins)
  33.  
  34. method_E_:
  35. choose whichever you want between the following two;
  36. from 1 to 100 (decimal version1, needs dice and coins)
  37. or
  38. from 1 to 100 (decimal version2, (6,8,9 and so on won’t come out, needs dice, the executor cannot cheat))
  39.  
  40. write your result down on the variables paper L=result
  41.  
  42.  
  43. from 1 to 10 (decimal version1, needs dice and coins)
  44.  
  45. roll the dice, if 6 comes out do it again.
  46. then, toss a coin, if it comes out tails then add 5 to the result
  47.  
  48.  
  49.  
  50. from 0 to 9 (needs dice and coins)
  51.  
  52. from 1 to 10-1
  53.  
  54.  
  55. from 1 to 100 (decimal version1, needs dice and coins)
  56.  
  57. the result of from 0 to 9 X 1 plus
  58.  
  59. the result of from 0 to 9 X 10 plus
  60.  
  61. the result of from 0 to 9 X 100 plus
  62.  
  63.  
  64.  
  65. from 0 to 127 (binary version, only needs coins)
  66.  
  67. start with 0
  68.  
  69. 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
  70.  
  71. if coin #1 is heads, add 1
  72.  
  73. if coin #2 is heads, add 2
  74.  
  75. if coin #3 is heads, add 3
  76.  
  77. if coin #4 is heads, add 8
  78.  
  79. if coin #5 is heads, add 16
  80.  
  81. if coin #6 is heads, add 32
  82.  
  83. if coin #7 is heads, add 64
  84.  
  85.  
  86.  
  87. from 0 to 100 (binary version1, the probability of 0 to 27 to come out will decrease, only needs coins)
  88.  
  89. do from 0 to 127 and then if the result is more then 100 subtract 100
  90.  
  91.  
  92.  
  93. from 0 to 100 (binary version2(may take many tries))
  94.  
  95. do from 0 to 127 and then if the result is more then 100 repeat it.
  96.  
  97.  
  98.  
  99.  
  100.  
  101. from 1 to 100 (decimal version2, (6,8,9and so on won’t come out, needs dice, the executor cannot cheat))
  102.  
  103. you need 2 players to play this game, the “player” and the “executor”
  104. the executor does everything except where it is mentioned that the player should do something.
  105.  
  106. how to get a number from 0 to 50
  107. Random_Number_0_to_50:
  108. repeat until the result is not negative:
  109. -roll first dice multiply times 10 then add the second roll of dice
  110. -subtract 11
  111. -the player should write down the results of both dice rolls and save them for later
  112. -the executor should write down the hidden random number and keep it hidden until the game is over
  113. -be sure to record every pair of rolls of the dice and every hidden number for later verification
  114.  
  115. how to get a number 0 to 100
  116. RandomNumberA is Random_Number_0_to_50
  117. RandomNumberB is Random_Number_0_to_50
  118. if RandomNumberB is 0 then change RandomNumberB to 1
  119. make Random_number_Zero_to_100 into RandomNumberA+RandomNumberB
  120. write down L=Random_number_Zero_to_100 on the variables paper
  121.  
  122. after the game ends:
  123. repeat for every pair of rolls of the dice:
  124. repeat until the result is not negative:
  125. -first roll of dice written down by player multiply times 10 then add the second roll of dice
  126. -subtract 11
  127. 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