1
I need to make a program similar to the application "Anki", where the person will put a word in English and soon after its translation.
The program must read all questions and choose one randomly to be returned to the user, the person must answer and the program must tell whether it is right or wrong. If he’s wrong he should return the correct answer.
The problem is that I cannot link the question with the right answer so that I can make the program read whether it is right or not. I’d like some help with that.
Follow what I’ve done so far:
import random
R = []
P = []
i = 0
num = int(input("informe quantas cartas serão digitadas:"))
for i in range(num):
p = str(input("digite a palavra número {0}".format(i+1)))
r = str(input("digite a resposta número {0}".format(i+1)))
i = i + 1
P.append(p)
R.append(r)
print("serão sorteadas as cartas digitadas no bloco de notas e você deverá colocar a tradução")
print("para iniciar aperte a tecla ENTER")
input()
print(random.choice(P))
right I will use, thanks for the help !
– Luiz Henrique Schuster