Skip to content

Marcus270503/Securin_Assessment

Repository files navigation

Securin_Assessment

Securin Python Assessment

Part - A

  1. Combinations
    The total combinations when rolling two six-sided dice can be calculated by multiplying the number of faces on each die. In this case,
    it's 6 * 6 = 36.

    Screenshot 2024-02-25 224759
  2. Distribution of Combinations
    To display the distribution of all possible combinations, we can create a 6x6 matrix where the element at position (i, j) represents the sum of Die A's i-th face and Die B's j-th face.

    Screenshot 2024-02-25 224819
  3. Probability of Sums
    Calculate the probability of each sum by counting the occurrences and dividing by the total number of combinations.

    Screenshot 2024-02-25 224834

Part - B

Undoom Dice
I devised a function called undoom_dice. I iterated through each face of Die A, checking if the number of spots exceeded 4. If it did, I replaced it with 4, ensuring that no face had more than 4 spots. Die B was simply copied as is since it could have any number of spots.

Screenshot 2024-02-25 224852

About

Securin Python Assessment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages