microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.3.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

katas/content/random_numbers/random_two_bits/solution.md

7lines · modepreview

Let's reuse the `RandomBit` operation from the "Generate A Single Random Bit" exercise.
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.

@[solution]({
    "id": "random_numbers__random_two_bits_solution",
    "codePath": "Solution.qs"
})