+ 1
How could I fix or improve this code.
I am trying to make this code to run continually. Whenever I try to run two inputs it has a string line error 1, command ("insert input here"). I want to why this won't work(I am kind of new to Python ,but not programming so sorry if this is a simple question). Also if you have anything to add to improve it I will listen to it. INPUT = input().lower() if INPUT in['hi', 'hello'] : print("\nComputer:Hello") elif INPUT in['goodbye', 'bye']: print("\nComputer:Bye") else: print('Sorry can you repeat that please')
3 odpowiedzi
+ 11
... Try including a loop in your code.
Like most languages, instructions will only be executed once in python unless you instruct otherwise
https://www.sololearn.com/learn/Python/2435/?ref=app
+ 1
Thank you, I will try that.
+ 1
Thank you, that worked very well.