摘要: number = int(input("请输入数字:"))count = 2while count <= number -1: if number % count == 0: #质数是除了1和它本身能除尽。将这个数从2开始除,除到number-1,如果有除尽的就不是质数,如果没有就是质数。 prin 阅读全文
posted @ 2019-05-27 10:53 冰灬荷 阅读(211) 评论(0) 推荐(0) 编辑
摘要: ad = input("请输入广告语:")if ad.count("最") >=1 or ad.count("稀缺的") >= 1 or ad.count("第一") >= 1 or ad.count("国家级") >= 1 : print("广告语不合法")else: print("广告语合法") 阅读全文
posted @ 2019-05-27 09:38 冰灬荷 阅读(315) 评论(0) 推荐(0) 编辑
摘要: number = int(input("请输入数字:")) count = 1while number // 10**count > 0: count =count +1else: print("这是一个 %s 位数!" % count) while True: num = int(input("请 阅读全文
posted @ 2019-05-27 09:34 冰灬荷 阅读(3019) 评论(0) 推荐(0) 编辑