Typos and Corrections
We will post typos and corrections to this page as we find them.
We would be eternally grateful if you would report any typos you find to authors@pythonformbas.com
We would be eternally grateful if you would report any typos you find to authors@pythonformbas.com
1.5 It's Time for Happy Hour
In the paragraph where we explain how to exit Interactive Mode, "Ctrl and Don a Mac" should read "Ctrl and D on a Mac"
2.8.1 String Functions
While demonstrating the replace() string function, we have the line print("okay fine".replace("fine", "great").upper()), and the output is correct when shown, but when explaining the piece of code the sentence 'Finally, we're taking the string "okay fine" and doing two things: replacing the text "fine" with "deal"...' and that is not correct given the example.
2.9 Getting User Input
When explaining that we're able to multiply strings by integers to repeat the string, during the dog years calculation example, then first running % python input.py the value assigned to "How old are you?" is 30 but then the output example prints 32323232323232, 32 printed 7 times, and not 30, as the example input suggests.
2.9.2 Tip Calculator Challenge
The example solution includes code in which the printed amounts (15%, 18%, and 20%) don't match up with the calculated amounts (18%, 20%, and 25%).
In the paragraph where we explain how to exit Interactive Mode, "Ctrl and Don a Mac" should read "Ctrl and D on a Mac"
2.8.1 String Functions
While demonstrating the replace() string function, we have the line print("okay fine".replace("fine", "great").upper()), and the output is correct when shown, but when explaining the piece of code the sentence 'Finally, we're taking the string "okay fine" and doing two things: replacing the text "fine" with "deal"...' and that is not correct given the example.
2.9 Getting User Input
When explaining that we're able to multiply strings by integers to repeat the string, during the dog years calculation example, then first running % python input.py the value assigned to "How old are you?" is 30 but then the output example prints 32323232323232, 32 printed 7 times, and not 30, as the example input suggests.
2.9.2 Tip Calculator Challenge
The example solution includes code in which the printed amounts (15%, 18%, and 20%) don't match up with the calculated amounts (18%, 20%, and 25%).