Skip to content

All assignments done#28

Merged
PythonCHB merged 4 commits into
UWPCE-PythonCert:masterfrom
voite1:master
Oct 17, 2014
Merged

All assignments done#28
PythonCHB merged 4 commits into
UWPCE-PythonCert:masterfrom
voite1:master

Conversation

@voite1

@voite1 voite1 commented Oct 17, 2014

Copy link
Copy Markdown
Contributor

Please, take a look at them. Any recommendations for improvement?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
.

PythonCHB added a commit that referenced this pull request Oct 17, 2014
All assignments done

nice job on mailroom!
@PythonCHB PythonCHB merged commit 78e6d4a into UWPCE-PythonCert:master Oct 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants