Skip to content

Commit

Permalink
Caesar_cipher code example showed right shift, not left.
Browse files Browse the repository at this point in the history
A left shift of 5 for the string "What a string" should yield the value "Rcvo v nomdib!". The output in the example shows a right shift of 5.

At the very least, the example from Wikipedia shows a left shift of three, "D->A" and "E->B" while the code example shows a right shift. The examples should be consistent on the page.
  • Loading branch information
JeffreyMPrice authored Nov 21, 2024
1 parent 251389a commit 7372952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ruby/basic_ruby_projects/project_caesar_cipher.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Harvard's CS50 class has a [video about the Caesar cipher](https://www.youtube.c

```ruby
> caesar_cipher("What a string!", 5)
=> "Bmfy f xywnsl!"
=> "Rcvo v nomdib!"
```

**Quick Tips:**
Expand Down

0 comments on commit 7372952

Please sign in to comment.