Skip to content

Commit

Permalink
Merge pull request #1 from SudhanshuMishra8826/master
Browse files Browse the repository at this point in the history
added Linear search python implementation
  • Loading branch information
tanseersaji authored Oct 5, 2018
2 parents d08032f + 87ff559 commit c513b30
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions linear_search/Python/linearsearch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
print("************************Linear search*****************************")
arr=list()
n=input("Enter the number of elements : ")
for i in range(int(n)):
ele=int(input("Element : "))
arr.append(int(ele))
key=int(input("Enter the key(elemt to be searched): "))
flag=0
for i in range(int(n)):
if(arr[i]==key):
print("Element Found at ", i+1)
flag=1
if flag==0:
print("Element not found ")
k=input("************************* Press Enter to Exit****************")

2 comments on commit c513b30

@sangamcse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on c513b30.

There are 11 results for the section all.pyjava. They have been shortened and will not be shown inline because they are more than 10.

Message File Line
Line contains following spacing inconsistencies: - Tabs used instead of spaces. linear_search/Python/linearsearch.py 5
Line contains following spacing inconsistencies: - Tabs used instead of spaces. linear_search/Python/linearsearch.py 6
Line contains following spacing inconsistencies: - Tabs used instead of spaces. linear_search/Python/linearsearch.py 10
Line contains following spacing inconsistencies: - Tabs used instead of spaces. linear_search/Python/linearsearch.py 11
Line contains following spacing inconsistencies: - Tabs used instead of spaces. linear_search/Python/linearsearch.py 12
Line contains following spacing inconsistencies: - Tabs used instead of spaces. linear_search/Python/linearsearch.py 14
Line contains following spacing inconsistencies: - Trailing whitespaces. skip_list/Python/SkipList.py 59
Line contains following spacing inconsistencies: - Trailing whitespaces. skip_list/Python/SkipList.py 69
Line contains following spacing inconsistencies: - Trailing whitespaces. skip_list/Python/SkipList.py 76
Line contains following spacing inconsistencies: - Trailing whitespaces. skip_list/Python/SkipList.py 87
Line contains following spacing inconsistencies: - Trailing whitespaces. skip_list/Python/SkipList.py 91

Until GitMate provides an online UI to show a better overview, you can run coala locally for more details.

@sangamcse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on c513b30.

There are 96 results for the section all.autopep8. They have been shortened and will not be shown inline because they are more than 10.

Message File Line
The code does not comply to PEP8. linear_search/Python/linearsearch.py 2
E225 missing whitespace around operator linear_search/Python/linearsearch.py 2
E225 missing whitespace around operator linear_search/Python/linearsearch.py 3
W191 indentation contains tabs linear_search/Python/linearsearch.py 5
E225 missing whitespace around operator linear_search/Python/linearsearch.py 5
W191 indentation contains tabs linear_search/Python/linearsearch.py 6
E225 missing whitespace around operator linear_search/Python/linearsearch.py 7
E225 missing whitespace around operator linear_search/Python/linearsearch.py 8
W191 indentation contains tabs linear_search/Python/linearsearch.py 10
E225 missing whitespace around operator linear_search/Python/linearsearch.py 10
W191 indentation contains tabs linear_search/Python/linearsearch.py 11
W191 indentation contains tabs linear_search/Python/linearsearch.py 12
E225 missing whitespace around operator linear_search/Python/linearsearch.py 12
E225 missing whitespace around operator linear_search/Python/linearsearch.py 13
W191 indentation contains tabs linear_search/Python/linearsearch.py 14
E225 missing whitespace around operator linear_search/Python/linearsearch.py 15
W391 blank line at end of file linear_search/Python/linearsearch.py 16
The code does not comply to PEP8. skip_list/Python/SkipList.py 10
The code does not comply to PEP8. skip_list/Python/SkipList.py 16
The code does not comply to PEP8. skip_list/Python/SkipList.py 23
The code does not comply to PEP8. skip_list/Python/SkipList.py 32
The code does not comply to PEP8. skip_list/Python/SkipList.py 42
The code does not comply to PEP8. skip_list/Python/SkipList.py 52
The code does not comply to PEP8. skip_list/Python/SkipList.py 64
The code does not comply to PEP8. skip_list/Python/SkipList.py 79
The code does not comply to PEP8. skip_list/Python/SkipList.py 91
The code does not comply to PEP8. skip_list/Python/SkipList.py 94
The code does not comply to PEP8. skip_list/Python/SkipList.py 102
The code does not comply to PEP8. skip_list/Python/SkipList.py 108
E302 expected 2 blank lines, found 0 skip_list/Python/SkipList.py 11
E231 missing whitespace after ',' skip_list/Python/SkipList.py 16
E231 missing whitespace after ',' skip_list/Python/SkipList.py 16
E225 missing whitespace around operator skip_list/Python/SkipList.py 17
E225 missing whitespace around operator skip_list/Python/SkipList.py 18
E302 expected 2 blank lines, found 1 skip_list/Python/SkipList.py 20
E225 missing whitespace around operator skip_list/Python/SkipList.py 23
E225 missing whitespace around operator skip_list/Python/SkipList.py 24
E225 missing whitespace around operator skip_list/Python/SkipList.py 25
E301 expected 1 blank line, found 0 skip_list/Python/SkipList.py 26
E231 missing whitespace after ',' skip_list/Python/SkipList.py 32
E231 missing whitespace after ',' skip_list/Python/SkipList.py 32
E225 missing whitespace around operator skip_list/Python/SkipList.py 33
E711 comparison to None should be 'if cond is None:' skip_list/Python/SkipList.py 33
E225 missing whitespace around operator skip_list/Python/SkipList.py 35
E225 missing whitespace around operator skip_list/Python/SkipList.py 37
E711 comparison to None should be 'if cond is not None:' skip_list/Python/SkipList.py 37
E225 missing whitespace around operator skip_list/Python/SkipList.py 37
E225 missing whitespace around operator skip_list/Python/SkipList.py 44
E231 missing whitespace after ',' skip_list/Python/SkipList.py 45
E225 missing whitespace around operator skip_list/Python/SkipList.py 45
E225 missing whitespace around operator skip_list/Python/SkipList.py 46
E231 missing whitespace after ',' skip_list/Python/SkipList.py 52
E225 missing whitespace around operator skip_list/Python/SkipList.py 53
E225 missing whitespace around operator skip_list/Python/SkipList.py 54
E225 missing whitespace around operator skip_list/Python/SkipList.py 56
E711 comparison to None should be 'if cond is not None:' skip_list/Python/SkipList.py 56
E225 missing whitespace around operator skip_list/Python/SkipList.py 56
E225 missing whitespace around operator skip_list/Python/SkipList.py 57
E225 missing whitespace around operator skip_list/Python/SkipList.py 58
W291 trailing whitespace skip_list/Python/SkipList.py 59
E231 missing whitespace after ',' skip_list/Python/SkipList.py 64
E225 missing whitespace around operator skip_list/Python/SkipList.py 65
E231 missing whitespace after ',' skip_list/Python/SkipList.py 65
E225 missing whitespace around operator skip_list/Python/SkipList.py 66
E231 missing whitespace after ',' skip_list/Python/SkipList.py 66
E225 missing whitespace around operator skip_list/Python/SkipList.py 67
E225 missing whitespace around operator skip_list/Python/SkipList.py 69
W291 trailing whitespace skip_list/Python/SkipList.py 69
E225 missing whitespace around operator skip_list/Python/SkipList.py 70
E711 comparison to None should be 'if cond is None:' skip_list/Python/SkipList.py 70
E225 missing whitespace around operator skip_list/Python/SkipList.py 72
E225 missing whitespace around operator skip_list/Python/SkipList.py 73
E225 missing whitespace around operator skip_list/Python/SkipList.py 74
W291 trailing whitespace skip_list/Python/SkipList.py 76
E231 missing whitespace after ',' skip_list/Python/SkipList.py 79
E225 missing whitespace around operator skip_list/Python/SkipList.py 80
E225 missing whitespace around operator skip_list/Python/SkipList.py 81
E231 missing whitespace after ',' skip_list/Python/SkipList.py 81
E225 missing whitespace around operator skip_list/Python/SkipList.py 82
E711 comparison to None should be 'if cond is not None:' skip_list/Python/SkipList.py 82
E225 missing whitespace around operator skip_list/Python/SkipList.py 84
E225 missing whitespace around operator skip_list/Python/SkipList.py 85
E711 comparison to None should be 'if cond is None:' skip_list/Python/SkipList.py 85
E225 missing whitespace around operator skip_list/Python/SkipList.py 86
E225 missing whitespace around operator skip_list/Python/SkipList.py 87
W291 trailing whitespace skip_list/Python/SkipList.py 87
W291 trailing whitespace skip_list/Python/SkipList.py 91
E225 missing whitespace around operator skip_list/Python/SkipList.py 94
E225 missing whitespace around operator skip_list/Python/SkipList.py 95
E711 comparison to None should be 'if cond is not None:' skip_list/Python/SkipList.py 95
E225 missing whitespace around operator skip_list/Python/SkipList.py 97
E305 expected 2 blank lines after class or function definition, found 0 skip_list/Python/SkipList.py 99
E225 missing whitespace around operator skip_list/Python/SkipList.py 102
E225 missing whitespace around operator skip_list/Python/SkipList.py 108
E711 comparison to None should be 'if cond is not None:' skip_list/Python/SkipList.py 108
E501 line too long (82 > 80 characters) skip_list/Python/SkipList.py 109

Until GitMate provides an online UI to show a better overview, you can run coala locally for more details.

Please sign in to comment.