回答編集履歴

1

処理内容変更

2020/05/06 05:40

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -9,8 +9,6 @@
9
9
  import tkinter as tk
10
10
 
11
11
  import random
12
-
13
-
14
12
 
15
13
 
16
14
 
@@ -54,19 +52,17 @@
54
52
 
55
53
  def ok_click(event=None):
56
54
 
57
- if entry.get() != value.get():
55
+ if entry.get() == value.get():
58
56
 
59
- return
57
+ global n
60
58
 
61
- global n
59
+ n = (n + 1) % len(q)
62
60
 
63
- n = (n + 1) % len(q)
61
+ question.set(q[n])
64
62
 
65
- question.set(q[n])
63
+ entry.set("")
66
64
 
67
65
  value.set(random.randint(0, 100))
68
-
69
- entry.set("")
70
66
 
71
67
 
72
68