Ai remember conversation problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Ai remember conversation problem

conv = ["Hello", "Hi", "How are you?", "Good!"] input1 = input(">: ") for x in range(1,int(len(conv))): if (conv[x] == input1): print(conv[x+1]) Can someone explain why this wont work? When i type Hello it should say Hi... But it doesn’t!!! Thx

21st Feb 2018, 5:22 AM
James Pinder
2 Answers
+ 2
Fixed it, if anyone else has a similar problem just remember lists start at object 0 not object 1
21st Feb 2018, 5:25 AM
James Pinder
0
No problem
22nd Feb 2018, 9:51 AM
James Pinder