Skip to content

saddle-points: readme grammar #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exercises/beer-song/beer_song_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_songing_several_verses(self):
"6 bottles of beer on the wall.\n\n"
"6 bottles of beer on the wall, 6 bottles of beer.\n"
"Take one down and pass it around, "
"5 bottles of beer on the wall.\n\n"
"5 bottles of beer on the wall.\n"
)

def test_song_all_the_rest_of_the_verses(self):
Expand All @@ -63,7 +63,7 @@ def test_song_all_the_rest_of_the_verses(self):
"no more bottles of beer on the wall.\n\n"
"No more bottles of beer on the wall, no more bottles of beer.\n"
"Go to the store and buy some more, "
"99 bottles of beer on the wall.\n\n"
"99 bottles of beer on the wall.\n"
)


Expand Down
6 changes: 3 additions & 3 deletions exercises/beer-song/example.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
def song(first, last=0):
verses = ''
verses = []
for number in reversed(range(last, first + 1)):
verses += verse(number) + '\n'
verses.append(verse(number))

return verses
return '\n'.join(verses)


def verse(number):
Expand Down
2 changes: 1 addition & 1 deletion exercises/saddle-points/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ So say you have a matrix like so:
It has a saddle point at (1, 0).

It's called a "saddle point" because it is greater than or equal to
every element in its row and the less than or equal to every element in
every element in its row and less than or equal to every element in
its column.

A matrix may have zero or more saddle points.
Expand Down