''' 题目:0——100闭区间产生3个随机数,两种方法排序 法1:暴力遍历 法2:max(a,b,c)min(a,b,c) 注意:random,radint(0——100)产生随机数 '''
import...random
#生成随机数
#法1:暴力遍历
def fa1(a, b, c):
if(a > b):
temp = a
a = b
b =...= c
c = temp
if(b < c):
temp = b
b = c
c = temp
print("法1从高到低..., max1))
def main():
a = random.randint(0, 100)
b = random.randint(0, 100)
c = random.randint...(0, 100)
fa1(a,b,c)
fa2(a,b,c)
main()