All assignments done#28
Conversation
There was a problem hiding this comment.
interesting approach.
Check out the stri.translate() method -- it does kind of the same thing, but much faster.
or you could use the math -- ord(letter) will give you the numerical value, which you can add 13 to, then use chr() to make it a letter.
but this is fine, too -- more than one way to write a function.
There was a problem hiding this comment.
I did not even think of ord() at the time of writing. I will try one
tomorrow.
On Oct 16, 2014 9:20 PM, "Christopher H.Barker, PhD" <
notifications@github.com> wrote:
In Students/A.Kramer/session03/ROT13.py:
@@ -0,0 +1,30 @@
+'''
+Created on Oct 1, 2014
+
+@author: db345c
+'''
+
+def rot13(s):
- alpha1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz .!<>;:'"
interesting approach.
Check out the stri.translate() method -- it does kind of the same thing,
but much faster.or you could use the math -- ord(letter) will give you the numerical
value, which you can add 13 to, then use chr() to make it a letter.but this is fine, too -- more than one way to write a function.
—
Reply to this email directly or view it on GitHub
https://github.com/UWPCE-PythonCert/IntroToPython/pull/28/files#r19001135
.
All assignments done nice job on mailroom!
Please, take a look at them. Any recommendations for improvement?