Please help meI was looking for it for 4 hours and this is the code I came up withIt works, but I can't print out the last word added. TT: Please save meㅠ<
engkor_dict = [ ]
while True:
eng = input('English word :')
engkor_dict = {}
if eng == "":
break
kor = input('Korean word :')
engkor_dict = {}
if kor == "":
break
print(engkor_dict)
engkor_dict=dict() # According to the homework: "declaring an empty dictionary through the sentence engkor_dict=dict()"
while True:
eng = input('English word :')
# engkor_dict = {} # Must not overwrite already declared engkor_dict
if eng == "":
break
kor = input('Korean word :')
#engkor_dict = {} # Must not overwrite already declared engkor_dict
if kor == "":
break
Engkor_dict[eng] = kor # According to the homework: "Registration of English words and Korean words entered is made through engkor_dict[eng] = kor sentences."
print(engkor_dict)
© 2024 OneMinuteCode. All rights reserved.