You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit de4738f
Browse filesBrowse the repository at this point in the historyBrowse files
//- "num" represents a random whole number between 1 and 100.
13
13
//Break down of expression
14
-
//-Math.random: This generates a random decimal number between 0 and 1. It can return 0, but never reaches 1. (Example: 0.87).
14
+
//-Math.random: This generates a random decimal number between 0 and 1. It can return 0, but never reaches 1. (Example: 0.87).
15
+
//-(maximum - minimum + 1):
16
+
// This expression can be simplified as (100 - 1 + 1), which equals 100. This tells the program how many possible whole numbers there are. There are 100 possibilities.
17
+
// The +1 is important as without it, we would only reach 99 possibilities, that is 0 - 99.
0 commit comments