Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
Linearsearch .py
please check find out error on help me on line no. in 19 on python programs linear search.py
2 Antworten
+ 3
Your indenting is all wrong.
while choice is 'Y':
?s=input("Enter element to be searched:")
?i=LinearSearch(items,int(s))
??if i is -1:
???print("value not found")
??else:
???print("value found at positon {}".format(i))
???choice=input("Do you want to continue?y/n")
Wherever I've put a '?', put that many tabs there. 👍
+ 3
Also, next time post your relevant code in the question description and maybe a link to the code for quicker access.