Skip to content

Commit 7c8c4f2

Browse files
committed
Add "Random Number Generator" example
Signed-off-by: Ercan Ersoy <ercanersoy@ercanersoy.net>
1 parent d537497 commit 7c8c4f2

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

random-number-generator/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Random Number Generator
2+
3+
A random number generator program
4+
5+
This example generates desired random number of desired range.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from random import uniform
2+
3+
random_number_count = int(input("How many random number: "))
4+
minimum_random_value = float(input("Minimum random value: "))
5+
maximum_random_value = float(input("Maximum random value: "))
6+
7+
while random_number_count != 0:
8+
print(uniform(minimum_random_value, maximum_random_value))
9+
10+
random_number_count -= 1

0 commit comments

Comments
 (0)