Skip to content

Commit 38b67fd

Browse files
committed
fix: figures in posts
1 parent 852ce22 commit 38b67fd

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

content/chapter-2/203.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We highlighted the Copilot logo in the bottom right of figure 2.1 as you should
2020

2121
> Figure 2.1 The VSCode Interface [3].
2222
23-
![](chapter-2.files/chapter-29250.png)
23+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/2.1.png)
2424

2525
### 2.3.1 Set up your working folder
2626

@@ -36,12 +36,12 @@ Let’s check to see if we’ve set up everything properly and that Copilot is w
3636

3737
> Figure 2.2 How to create a new file in VSCode.
3838
39-
![](chapter-2.files/chapter-210805.png)
39+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/2.2.png)
4040

4141

4242
> Figure 2.3 Select to create the New File as a Python File.
4343
44-
![](chapter-2.files/chapter-210871.png)
44+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/2.3.png)
4545

4646

4747

content/chapter-2/205.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To download the dataset, you will have to sign up for a Kaggle account. If you d
3737

3838
> Figure 2.4 The first few columns and rows of the `nfl_offensive_stats.csv` dataset.
3939
40-
![](chapter-2.files/chapter-223774.png)
40+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/2.4.png)
4141

4242

4343
The `nfl_offensive_stats.csv` file is something known as a comma separated value text file (see figure 2.4 for a portion of the file). This is a pretty standard format for storing data. It has a header row at the top that explains what’s in every column. The way that we (or a computer) know the boundaries between columns is to use the commas between cells. Also notice that each row is placed on its own line.
@@ -298,7 +298,7 @@ When you run this command, you’ll see that a bunch of modules are installed, i
298298
> Figure 2.5 The plot produced by the code in listing 2.2.
299299
300300

301-
![](chapter-2.files/chapter-242745.png)
301+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/2.5.png)
302302

303303
In this bar graph, we see the y-axis is the number of passing yards and the x-axis is the player’s name. The players are sorted from the fewest yards (with a minimum of 4000) to most yards. Admittedly, it’s not perfect as it is missing a y-axis label and the names on the x-axis are cut off at the bottom, but this is pretty impressive given all we gave Copilot was a pretty short prompt. We could keep adding prompts to see if we can format the graph better, but we’ve already achieved the primary goals for this section which was to show you how powerful Copilot is at helping us write code and to get a feel for how to interact with Copilot.
304304

content/chapter-3/301.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Suppose that you’ve found a word search puzzle in the newspaper that you’d l
1313
> Figure 3.1 Example Wordsearch puzzle
1414
1515

16-
![](chapter-3.files/chapter-33098.png)
16+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/3.1.png)
1717

1818
At a high level, your task is “find all of the words in the word search”. Unfortunately, that description of the task isn’t helpful on its own. It doesn’t tell us what steps we need to carry out to solve the problem.
1919

content/chapter-3/303.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ So, we’re back in `funct1`, on the line `print("")`. Printing an empty piece o
7575
> Figure 3.2 Flow of function execution in our example from listing 3.1.
7676
7777

78-
![](chapter-3.files/chapter-323209.png)
78+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/3.2.png)
7979

8080
That was a long example, but we provided it to help give you an idea of how functions execute and how programs consist of defining and calling functions. In any software you use, think about the specific tasks that it performs: the programmers probably wrote one or more functions for each one. The button in a text editor that changes the text to bold probably calls a function to change the text to bold. That function might change the editor’s internal idea of the text (the editor likely stores your text in a different format than how you view it) and then it might call another function that updates the user’s (your) view of the text.
8181

content/chapter-3/305.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Designing functions with Copilot involves the following cycle of steps (see figu
1818

1919
> Figure 3.3 General editing cycle with Copilot. This assumes you define a reasonable function.
2020
21-
![](chapter-3.files/chapter-332417.png)
21+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/3.3.png)
2222

2323

2424

content/chapter-3/306.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ This way, we can call the function as many times as we like without going throug
5757
> Figure 3.4 Running Python in an interactive session in the Terminal of VSCode. Note the \>>> at the bottom of the Terminal.
5858
5959

60-
![](chapter-3.files/chapter-338016.png)
60+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/3.4.png)
6161

6262
At the bottom of the resulting window, you will see three greater-than symbols >>>. This is called a _prompt_, and you’re allowed to type Python code here. (This _prompt_ has nothing to do with the kind of prompt that we use when interacting with Copilot.) It will show us the result of the code that we type right away, which is convenient and fast.
6363

@@ -80,7 +80,7 @@ Is `20` correct? Well, we bought 10 shares, and each of them went up $2 (from $1
8080

8181
> Figure 3.5 Calling the `money_made` function from Python prompt in the VSCode Terminal.
8282
83-
![](chapter-3.files/chapter-339260.png)
83+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/3.5.png)
8484

8585

8686

content/chapter-4/402.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ For now, with the Copilot Labs extension installed, you can highlight some code
1616
> Figure 4.1 The Copilot Labs view in VSCode.
1717
1818

19-
![](chapter-4.files/chapter-48075.png)
19+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.1.png)
2020

2121

2222
First, click on the Copilot Labs tab in your Activity Bar (on the left-hand side of VSCode) and you should see a window similar to figure 4.1.
@@ -27,21 +27,21 @@ Next, highlight all of the code for our `best_word` function as is highlighted i
2727

2828
> Figure 4.2 The code from the `best_word` function highlighted in the editor.
2929
30-
![](chapter-4.files/chapter-48299.png)
30+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.2.png)
3131

3232
After highlighting the code, you should now see the code appear in the left in the EXPLAIN feature as shown in figure 4.3
3333

3434
> Figure 4.3 The code from the `best_word` function appearing in Copilot Labs.
3535
3636

37-
![](chapter-4.files/chapter-48572.png)
37+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.3.png)
3838

3939

4040
Figure 4.4 shows the different prompts provided by Copilot that you can use to ask for code explanations. Each will generally yield different responses that vary in how specific they are and whether they produce fewer or more examples. We'll leave it at the default prompt of “Explain Code,” but if you like, you can try other prompts from the drop-down box (shown in figure 4.4). The current options are "Explain Code," "Code Does Following," "Code Does Following (English)," and "Show Example Code." There's also a "Custom" option that allows you to use whatever prompt you like.
4141

4242
> Figure 4.4 The different options for explaining your code in Copilot Labs.
4343
44-
![](chapter-4.files/chapter-48774.png)
44+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.4.png)
4545

4646
The last step is to click Ask Copilot (as shown as the bottom button in figure 4.3). You'll get an explanation of the code. As usual, Copilot is nondeterministic, so your results will likely differ from ours. In fact, if an explanation is confusing you, you might try clicking Ask Copilot again or changing the prompt to get a different explanation. As educators, this is the start of a dream come true, where students will be able to ask for as many explanations as they need to fully understand how code works.
4747

content/chapter-4/403.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Don’t hesitate to experiment! To get started, press Ctrl+Shift+P and type REPL
1616
1717

1818

19-
![](chapter-4.files/chapter-412533.png)
19+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.5.png)
2020

2121
This will put you back at the same Python prompt as in Chapter 3 (as shown in figure 4.6), except with none of your functions loaded.
2222

2323

2424
> Figure 4.6 REPL running in VSCode.
2525
26-
![](chapter-4.files/chapter-412573.png)
26+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.6.png)
2727

2828

2929
Then we can start typing Python code. For example, type
@@ -356,7 +356,7 @@ Many Python types, including strings and lists, allow you to work with particula
356356

357357
> Figure 4.7 List elements can be accessed through either positive or negative indexes.
358358
359-
![](chapter-4.files/chapter-427708.png)
359+
![](https://raw.githubusercontent.com/cssmagic/Learn-AI-Assisted-Python-Programming/master/content/_figures/4.7.png)
360360

361361

362362
Let's practice indexing on the current books list:

0 commit comments

Comments
 (0)