摘要:
import random verifycode = '' for i in range(6): current = random.randrange(0,6) if current != i and current+1 != i: tmp = chr(random.randint(65,90)) elif current+1 == i: ... 阅读全文
摘要:
题目:有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少? 程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。 #!/usr/local/sbin/python3 # -*- coding: utf-8 -*- for i in range(1,5): for j in range(1,5): ... 阅读全文