|
4 | 4 |
|
5 | 5 | ### With `git`
|
6 | 6 |
|
7 |
| -If you have `git` installed, the easiest way to access these files is to clone the repository to the directory of your choice: |
| 7 | +If you have [`git` installed](https://realpython.com/python-git-github-intro/), the easiest way to access these files is to clone the repository to the directory of your choice: |
8 | 8 |
|
9 | 9 | ```console
|
10 | 10 | $ git clone https://github.com/realpython/python-basics-exercises.git
|
11 | 11 | ```
|
12 | 12 |
|
13 |
| -Then `cd` into the `itertools-in-python3` directory: |
14 |
| - |
15 |
| -```console |
16 |
| -$ cd materials/itertools-in-python3 |
17 |
| -``` |
18 |
| - |
19 | 13 | ### Without `git`
|
20 | 14 |
|
21 |
| -Alternatively, you can download the entire repository as a `.zip` file from the repository's [homepage](https://github.com/realpython/materials) using the green "Clone or download" button in the top right hand corner. |
22 |
| - |
23 |
| - |
| 15 | +Alternatively, you can download the entire repository as a `.zip` file from the repository's [homepage](https://github.com/realpython/python-basics-exercises) using the green "Clone or download" button in the top right hand corner, or by [clicking here](https://github.com/realpython/python-basics-exercises/archive/master.zip). |
24 | 16 |
|
25 | 17 | ## Running the Code Examples
|
26 | 18 |
|
27 | 19 | To run the code examples, first make sure you have Python 3 installed on your machine. **The code examples WILL NOT work with Python 2.** If you need help installing Python 3, check out Real Python's [Python 3 Installation & Setup Guide](https://realpython.com/installing-python/).
|
28 | 20 |
|
29 |
| -To run the `sp500.py` file, type `python3 sp500.py` into your terminal. Here's how that looks, with output: |
| 21 | +To run the `3-store-a-variable.py` file, type `python3 3-store-a-variable.py` into your terminal. Here's how that looks, with output: |
30 | 22 |
|
31 | 23 | ```console
|
32 |
| -$ python3 sp500.py |
33 |
| -Max gain: 11.58% on 2008-10-13 |
34 |
| -Max loss: -20.47% on 1987-10-19 |
35 |
| -Longest growth streak: 14 days (1971-03-26 to 1971-04-15) |
| 24 | +$ python3 ch03-first-python-program/3-store-a-variable.py |
| 25 | +hello |
| 26 | +hi |
36 | 27 | ```
|
37 | 28 |
|
38 | 29 | > **Note:** Depending on your installation, you may need to type `python3.6` or `python36` to run the examples. If you follow the [Python 3 Installation & Setup Guide](https://realpython.com/installing-python/), you should have no problem.
|
39 |
| -
|
40 |
| -Similarly, for `swimmers.py`: |
41 |
| - |
42 |
| -```console |
43 |
| -$ python3 swimmers.py |
44 |
| -Backstroke A: Sophia, Grace, Penelope, Addison |
45 |
| -Backstroke B: Elizabeth, Audrey, Emily, Aria |
46 |
| -Breaststroke A: Samantha, Avery, Layla, Zoe |
47 |
| -Breaststroke B: Lillian, Aria, Ava, Alexa |
48 |
| -Butterfly A: Audrey, Leah, Layla, Samantha |
49 |
| -Butterfly B: Alexa, Zoey, Emma, Madison |
50 |
| -Freestyle A: Aubrey, Emma, Olivia, Evelyn |
51 |
| -Freestyle B: Elizabeth, Zoe, Addison, Madison |
52 |
| -``` |
53 |
| - |
54 |
| -# TODO: Adapt for Python Basics |
0 commit comments