Skip to content

Commit

Permalink
Merge pull request #1 from Sigma-Labs-XYZ/add_code
Browse files Browse the repository at this point in the history
Add Longest Function
  • Loading branch information
keoghrmj authored Oct 10, 2024
2 parents e6beb84 + 4a645bf commit 0650a78
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ This is a new project that I am working on. It is a shiny new project.

## Installation

You can install the development version from Github.
You can install the development version from Github.

Changer
10 changes: 10 additions & 0 deletions longest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def find_longest(arr):
longest = arr[1]
for i in range(1, len(arr)):
if len(arr[i]) > len(longest):
longest = arr[i]
return longest


if __name__ == "__main__":
print(find_longest(["yellow", "red", "blue", "green"]))

0 comments on commit 0650a78

Please sign in to comment.