halterman / PythonBook-SourceCode

Python source code for the Fundamentals of Python Programming by Richard Halterman
http://python.cs.southern.edu/pythonbook/pythonbook.pdf
39 stars 24 forks source link

Errata on page 174 & 175 #5

Open jayaramcloud opened 4 years ago

jayaramcloud commented 4 years ago

Hi Richard, Thanks a lot for your book and I love the flow. I have observed couple of trivial errata : 1.Page 174: # Print newine (I think you meant newline)

Listing 6.10: simplerandom.py from random import randrange, seed seed(23) # Set random number seed for i in range(0, 100): # Print 100 random numbers print(randrange(1, 1001), end=' ') # Range 1...1,000, inclusive print() # Print newine

2.Page 175: pseudorandomly (I think you meant randomly) Since the program generates the values pseudorandomly, actual output will vary from one run to the next

halterman commented 4 years ago

Jayaram:

Thank you for your kind words and for pointing out those issues. I corrected the newine -> newline error, and the October 10, 2019 version with the correction now is available for download.

With the term “pseudorandomly” I am trying to be precise and consistent, as a mathematical purist may take issue with the term “random” being used instead of “pseudorandom” for algorithmically generated values that are not truly random in the strictest sense of the term. Perhaps I am being too pedantic and should reconsider and use the simpler, less precise term after noting the differences.

Rick

From: Krishnaswamy Jayaram notifications@github.com Sent: Saturday, October 5, 2019 2:29 PM To: halterman/PythonBook-SourceCode PythonBook-SourceCode@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [halterman/PythonBook-SourceCode] Errata on page 174 & 175 (#5)

Hi Richard, Thanks a lot for your book and I love the flow. I have observed couple of trivial errata : 1.Page 174: # Print newine (I think you meant newline)

Listing 6.10: simplerandom.py from random import randrange, seed seed(23) # Set random number seed for i in range(0, 100): # Print 100 random numbers print(randrange(1, 1001), end=' ') # Range 1...1,000, inclusive print() # Print newine

2.Page 175: pseudorandomly (I think you meant randomly) Since the program generates the values pseudorandomly, actual output will vary from one run to the next

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/halterman/PythonBook-SourceCode/issues/5?email_source=notifications&email_token=ABULSUQLHPMKNHUGI4NLI3TQNDMHBA5CNFSM4I5Y2JC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HP3E6XQ, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABULSUX5H2P4MEKOTMGB47TQNDMHBANCNFSM4I5Y2JCQ.