Skip to content

Commit dcf7499

Browse files
Create Generating Random Numbers.py
1 parent c8db262 commit dcf7499

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Generating Random Numbers.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
def randomize():
2+
min= int(input("What is the Lower Range of Your Values ? "))
3+
max= int(input("What is the Upper Range of Your Values ? "))
4+
import random
5+
d=int(input("How many Values do you want to generate ? "))
6+
print ("Rotating the Board...")
7+
print ("The values are....")
8+
if max-min<d:
9+
print("ERROR, Can't generate Values more than the Specified range")
10+
else :
11+
for i in range(1,d+1,+1):
12+
a=(random.randrange(min,max))
13+
print(a)
14+
15+
randomize()
16+
roll_again =input("Generate again? (Y/N) :")
17+
if roll_again=="Y" :
18+
randomize()
19+
else :
20+
quit

0 commit comments

Comments
 (0)