Skip to content

Commit b4cd50a

Browse files
Merge pull request #727 from Quantum-Software-Development/FabianaCampanari-patch-1
Update README.md
2 parents 249f012 + e416c9d commit b4cd50a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,25 +1821,30 @@ After running Solver, you should get a solution like:
18211821

18221822
<br><br>
18231823

1824-
## 1- [Modulo in Random Number Simulations]():
1824+
### 1- [Modulo in Random Number Simulations]():
18251825

18261826
<br>
18271827

1828-
### [Animated Visualization of the Remainder from Integer Division Used in Random Number Simulations]().
1828+
#### ➢ Animated Visualization of the [Remainder from Integer Division]() Used in Random Number Simulations.
18291829

18301830
<br>
18311831

18321832
<p align="center">
18331833
<img src="https://github.com/FabianaCampanari/University-Python-Projects/assets/113218619/176fd74d-5755-4ac0-9b6e-08e6678cf251"/>
18341834

1835+
<br>
18351836

18361837
The modulo operator (%) returns the remainder of a division. In simulations involving random numbers, it is commonly used to restrict or map large random outputs into a defined range.
18371838

1838-
### [Why Use Modulo in Random Number Simulations]() ?
1839+
<br>
1840+
1841+
### 2- [Why Use Modulo in Random Number Simulations]() ?
18391842

18401843
In simulations, we often need random values within a specific interval — for example, simulating a dice roll (1 to 6) or selecting a random day of the week (0 to 6). Random number generators typically produce large numbers, so the modulo operation helps normalize these into the desired range.
18411844

1842-
### [Example]():
1845+
<br>
1846+
1847+
### 3- [Example]():
18431848

18441849
Imagine your random number generator gives you a number like 247. If you want to simulate a 6-sided dice roll:
18451850

@@ -1857,10 +1862,12 @@ This maps any large number into the range of weekdays (e.g., 0 = Sunday, 6 = Sat
18571862

18581863
<br>
18591864

1860-
### [Summary]():
1865+
### 4- [Summary]():
18611866

18621867
In simulations, the % operator is a simple and efficient way to control the range of random outputs. It transforms raw random data into usable, context-specific values, essential for realistic and accurate simulation scenarios.
18631868

1869+
<br>
1870+
18641871

18651872

18661873
<!--

0 commit comments

Comments
 (0)