-
仕様
- Generating a random integer from the range of a to b(with a included)
- The unit of it is 100¥
- The value of [a] and [b] can be set by the user
-
流れ
- Ask[Please set the value of "a" and "b"]
- the Values of "a" and "b" are input by the user
- generate a single random integer number between "a" and "b"
-
Knowledge needed
-
About the Random Module
- Usage and Method of using this module
- Conversion between float and integer
-
Coding Process
-
Import and define
- Import the module needed and define the variables needed
- generate a random floating number with the uniform() function
- with the int() function to convert the floating number into an integer