Linearsearch .py | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Linearsearch .py

please check find out error on help me on line no. in 19 on python programs linear search.py

29th Jan 2017, 3:55 AM
Dharmesh Shukla
Dharmesh Shukla - avatar
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. 👍
29th Jan 2017, 11:06 AM
Jafca
Jafca - avatar
+ 3
Also, next time post your relevant code in the question description and maybe a link to the code for quicker access.
29th Jan 2017, 11:08 AM
Jafca
Jafca - avatar