提交 c566b8b5 编写于 作者: bmyy11's avatar bmyy11

Update index.py

上级 e4ac33b9
......@@ -68,25 +68,23 @@ def gai():
global c,y,ercuo
if c != 0:
print('一共错', c, '道!巩固错题!\n')
y = 0
c = 0
for i in cuo:
daan = cuo[i]
q = input(i + ': ')
if q == daan:
print('对啦对啦!')
y += 1
y1 += 1
else:
print('错喽错喽!')
c += 1
c1 += 1
ercuo[i] = daan
print('结束!\n一共对', y, '道,错', c, '道')
print('结束!\n一共对', y1, '道,错', c1, '道')
else:
pass
def xie():
#将错题答案写入文件中。
if c != 0:
if c1 != 0:
#是不是被我的命名习惯惊艳到了~
vue = open('cuowu.txt','a') #这个"cuowu.txt"要自己建一个
print('一共有', c, '道二错单词!,这里是答案\n')
......@@ -115,6 +113,8 @@ if __name__ == '__main__':
#主程序入口。初始化计数变量,创建空字典用于记录错题和错题答案,然后开始执行主程序。
y = 0
c = 0
y1 = 0
c1 = 0
cuo = {}
ercuo = {}
print('''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册