-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path032801.py
56 lines (52 loc) · 1010 Bytes
/
032801.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#1
"""
s = input("请输入")
print("{:=^15}".format(s[0:15]))
"""
#2
"""
a,b = 0, 1
while a <=100:
print(a, end = ",")
a, b = b,a+b
"""
#3
"""
import time
timestr = "2020-10-10 10:10:10"
t = time.strptime(timestr, "%Y-%m-%d %H:%M:%S")
print(time.strftime("%Y年%m月%d日%H时%M分%S秒", t))
"""
#4
"""
import turtle as t
for i in range(3):
t.seth(120*i)
t.fd(200)
"""
#5
"""
d = {"数学":101, "语文":202, "英语":203, "物理":204, "生物":206}
d["化学"] = 205
d["数学"] = 201
del d["生物"]
for key in d:
print("{}:{}".format(d[key],key))
"""
#6
import random
ls = []
first = ""
s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*"
while len(ls) < 10:
pwd = ""
for i in range(10):
pwd += s[random.randint(0,len(s)-1)]
if pwd[0] in first:
continue
else:
ls.append(pwd)
first += pwd[0]
fo = open("txt.txt","w",encoding = "utf-8")
fo.write(str("\n".join(ls)))
fo.close()