-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheilaj.py
31 lines (24 loc) · 973 Bytes
/
eilaj.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def main(questions, answers):
questions2 = ("Do you have other friends here?", "How often do you play here?")
answers2 = [("A. Yes", "B. No"), ("A. All the time", "B. Never", "C. Sometimes")]
counter = 0
while counter < len(questions2):
print(questions2[counter])
if questions2[counter] not in questions:
questions.append(questions2[counter])
print_list(answers2[counter])
answer = input()
try:
index = translate(answer)
answers.append(answers2[counter][index][3:])
except IndexError or ValueError:
print("I'm sorry but can you say that again? I didn't quite get what you were saying.")
continue
counter += 1
def translate(answer):
list = ["A", "B", "C", "D", "E", "F", "G"]
index = list.index(answer.upper())
return index
def print_list(list):
for i in list:
print(i)