from random import randint
from random import randint
minval=0
maxval=0
random=0
tempmin=0
tempmax=0
while True:
try:
minval=int(input("What is the minimum value for the RNG? "))
#Space is there so it would look neater
except ValueError:
print("I'm just going to assume you want the min value to be 1")
minval=1
#In case the user inserts a string
try:
maxval=int(input("What is the maximum value for the RNG? "))
except ValueError:
print("I'm just going to assume you want the max value to be 100")
maxval=100
if minval>maxval:
tempmin=minval
tempmax=maxval
minval=tempmax
maxval=tempmin
random=randint(minval, maxval)
print("The RNG randomly picked " + str(random))