回答編集履歴

2

不要処理削除

2022/03/31 17:38

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -36,7 +36,6 @@
36
36
 
37
37
  def convert():
38
38
  currency = txtBox.get().strip().lower()
39
- converter = eur.get(currency)
40
39
  if currency in eur:
41
40
  label5['text'] = eur[currency]['rate']
42
41
  else:

1

判定処理変更

2022/03/31 17:36

投稿

shiracamus
shiracamus

スコア5406

test CHANGED
@@ -37,7 +37,7 @@
37
37
  def convert():
38
38
  currency = txtBox.get().strip().lower()
39
39
  converter = eur.get(currency)
40
- if converter:
40
+ if currency in eur:
41
41
  label5['text'] = eur[currency]['rate']
42
42
  else:
43
43
  label5['text'] = 'unknown'