글 지운게 같은프로그램에서 또 막혀서 답변해주는사람들 헷갈리지 말라고 지웠던건데 화났네 형들 미안... 담부턴 안지울게

답변 두명 고마웠어 왜 range를 지웠을까 내가..


dic={}

w={}


while True:

    a=input("영어 단어 : ")

    

    if a=='':

        break

    

    if a not in dic:

        b=input("한글해석 : ")

        dic[a]=b

        continue

    

    continue


while True:

    for i in range(len(dic)):

        print(dic.value(i))

        ans=input("영어 단어 : ")

        if ans!=dic.key(i):

            w.update(dic)


            

print(w)



아까 거기서 range는 해결됐는데

두번째 while문이 막혔음

이게 지금 리스트 입력받은 다음에

리스트 밸류값 보여준다음에 입력을 받아서 입력값이 해당 밸류값의 키와 일치하지 않으면 오답노트에 추가하는 거거든?

근데 dic.value 넣으면


Traceback (most recent call last):


  File "C:\Users\ahnjunyong\.spyder-py3\untitled1.py", line 19, in

    print(dic.value(i))


AttributeError: 'dict' object has no attribute 'value'


이거뜨고


dic.values넣으면


Traceback (most recent call last):


  File "C:\Users\ahnjunyong\.spyder-py3\untitled1.py", line 19, in

    print(dic.values(i))


TypeError: values() takes no arguments (1 given)


이거떠서 뭐써야할지 모르겠음...