1- [ Contents] ( ../Contents ) \| [ Previous (1.1 Python)] ( 01_Python ) \| [ Next (1.3 Numbers)] ( 03_Numbers )
1+ [ Contents] ( ../Contents.md ) \| [ Previous (1.1 Python)] ( 01_Python.md ) \| [ Next (1.3 Numbers)] ( 03_Numbers.md )
22
33# 1.2 A First Program
44
@@ -51,7 +51,7 @@ hello world
5151This so-called * read-eval-print-loop* (or REPL) is very useful for debugging and exploration.
5252
5353** STOP** : If you can't figure out how to interact with Python, stop what you're doing
54- and figure out how to do it. If you're using an IDE, it might be hidden behind a
54+ and figure out how to do it. If you're using an IDE, it might be hidden behind a
5555menu option or other window. Many parts of this course assume that you can
5656interact with the interpreter.
5757
@@ -63,7 +63,7 @@ Let's take a closer look at the elements of the REPL:
6363The ` ... ` prompt may or may not be shown depending on your environment. For this course,
6464it is shown as blanks to make it easier to cut/paste code samples.
6565
66- The underscore ` _ ` holds the last result.
66+ The underscore ` _ ` holds the last result.
6767
6868``` python
6969>> > 37 * 42
@@ -109,7 +109,7 @@ C:\SomeFolder>c:\python36\python hello.py
109109hello world
110110```
111111
112- Note: On Windows, you may need to specify a full path to the Python interpreter such as ` c:\python36\python ` .
112+ Note: On Windows, you may need to specify a full path to the Python interpreter such as ` c:\python36\python ` .
113113However, if Python is installed in its usual way, you might be able to just type the name of the program
114114such as ` hello.py ` .
115115
@@ -265,7 +265,7 @@ Indentation groups the following statements together as the operations that repe
265265 num_bills = num_bills * 2
266266```
267267
268- Because the ` print() ` statement at the end is not indented, it
268+ Because the ` print() ` statement at the end is not indented, it
269269does not belong to the loop. The empty line is just for
270270readability. It does not affect the execution.
271271
@@ -275,7 +275,7 @@ readability. It does not affect the execution.
275275* Use 4 spaces per level.
276276* Use a Python-aware editor.
277277
278- Python's only requirement is that indentation within the same block
278+ Python's only requirement is that indentation within the same block
279279be consistent. For example, this is an error:
280280
281281``` python
@@ -464,12 +464,12 @@ NameError: name 'days' is not defined
464464Reading error messages is an important part of Python code. If your program
465465crashes, the very last line of the traceback message is the actual reason why the
466466the program crashed. Above that, you should see a fragment of source code and then
467- an identifying filename and line number.
467+ an identifying filename and line number.
468468
469469* Which line is the error?
470470* What is the error?
471471* Fix the error
472472* Run the program successfully
473473
474474
475- [ Contents] ( ../Contents ) \| [ Previous (1.1 Python)] ( 01_Python ) \| [ Next (1.3 Numbers)] ( 03_Numbers )
475+ [ Contents] ( ../Contents.md ) \| [ Previous (1.1 Python)] ( 01_Python.md ) \| [ Next (1.3 Numbers)] ( 03_Numbers.md )
0 commit comments