标签:print sort app add python 组合 numbers def TBase
import random def getBaseBigHapppyNumbers(): frontNumbers = set(); backNumbers = set(); while(len(frontNumbers)<5): cur = random.randint(1, 35) frontNumbers.add(cur) while(len(backNumbers)<2): cur = random.randint(1, 12) backNumbers.add(cur) sorted(frontNumbers) sorted(backNumbers) print("随机的组合为:") print(frontNumbers) print(backNumbers) def getDoubleColorBall(): frontNumbers = set(); backNumbers = set(); while(len(frontNumbers)<6): cur = random.randint(1, 33) frontNumbers.add(cur) while(len(backNumbers)<1): cur = random.randint(1, 16) backNumbers.add(cur) sorted(frontNumbers) sorted(backNumbers) print("随机的组合为:") print(frontNumbers) print(backNumbers) if __name__ == ‘__main__‘: getBaseBigHapppyNumbers() getDoubleColorBall()
标签:print sort app add python 组合 numbers def TBase
原文地址:https://www.cnblogs.com/yspworld/p/13175956.html