microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/random_numbers/random_two_bits/solution.md
7lines · modecode
| 1 | Let's reuse the `RandomBit` operation from the "Generate A Single Random Bit" exercise. |
| 2 | We can generate two random bits by calling the `RandomBit` operation twice, multiply the most significant bit by 2 and add the least significant bit to generate a random two-bit number. |
| 3 | |
| 4 | @[solution]({ |
| 5 | "id": "random_numbers__random_two_bits_solution", |
| 6 | "codePath": "Solution.qs" |
| 7 | }) |
| 8 | |