复制代码 代码如下:import random def genrand(small, big) : return small + (big-small) * random.random() def display(small, big) : return r’请输入上下限(默认%.2f~%.2f):’ % (small, big) big = 100small = 0 while True : try : s = input(display(small, big)).strip() if s.lower() == ‘exit’ :