repl.it
@ItsYeBoiJ/

Random number gen

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
import random
min_num = int(input('Enter your min num: '))
max_num = int(input('Enter your max num: '))
random_num = random.randint(min_num,max_num)
print('Your random number is: ' +str(random_num))
user = input('Would you like to get another number? Y/N: ')
while user == 'Y':
  random_num = random.randint(min_num,max_num)
  print('Your random number is: ' +str(random_num))
  user = input('Would you like to get another number? Y/N: ')
print('Goodbye!')