WEBVTT

1
00:00:00.160 --> 00:00:02.279
<v Speaker 1>So I want you to think back to high school

2
00:00:02.319 --> 00:00:05.599
<v Speaker 1>math for a second. Oh boy, right, just picture it.

3
00:00:05.879 --> 00:00:10.640
<v Speaker 1>You're sitting at this tiny, uncomfortable desk. You've got a

4
00:00:10.720 --> 00:00:13.400
<v Speaker 1>yellow number two pencil in your hand, and you're just

5
00:00:13.599 --> 00:00:18.480
<v Speaker 1>staring down at this massive page of complex equations, endless

6
00:00:18.519 --> 00:00:22.320
<v Speaker 1>rows of them, exactly, and the expectation was that you'd

7
00:00:22.320 --> 00:00:25.600
<v Speaker 1>solve them all completely by hand, just grinding through the

8
00:00:25.640 --> 00:00:27.600
<v Speaker 1>arithmetics step by tedious step.

9
00:00:27.760 --> 00:00:30.399
<v Speaker 2>Yeah, which is I mean, it's the equivalent of being

10
00:00:30.440 --> 00:00:32.679
<v Speaker 2>asked to dig the foundation for a brand new house,

11
00:00:33.119 --> 00:00:35.000
<v Speaker 2>but the only tool you're given is a teaspoon.

12
00:00:35.119 --> 00:00:35.759
<v Speaker 1>A teaspoon.

13
00:00:35.880 --> 00:00:39.200
<v Speaker 2>Yeah. You spend so much energy on the sheer physical

14
00:00:39.280 --> 00:00:43.039
<v Speaker 2>labor of moving the dirt that you completely lose sight

15
00:00:43.119 --> 00:00:45.840
<v Speaker 2>of the architectural principles behind the house you're trying to build.

16
00:00:45.960 --> 00:00:49.039
<v Speaker 1>The labor just completely distracts you from the actual architecture.

17
00:00:49.200 --> 00:00:51.960
<v Speaker 1>And well, that is exactly why A Met SAHA's book

18
00:00:52.200 --> 00:00:54.840
<v Speaker 1>Doing Math with Python is such a crucial stack of

19
00:00:54.880 --> 00:00:56.159
<v Speaker 1>source material for us today.

20
00:00:56.200 --> 00:00:56.759
<v Speaker 2>It really is.

21
00:00:57.039 --> 00:00:59.880
<v Speaker 1>We're looking at how coding acts as the ultimate shark

22
00:01:00.200 --> 00:01:03.479
<v Speaker 1>to mathematical fluency. The mission of this deep dive is

23
00:01:03.520 --> 00:01:05.760
<v Speaker 1>to see what happens when you put down that teaspoon

24
00:01:06.000 --> 00:01:08.640
<v Speaker 1>and bring in a bulldozer instead.

25
00:01:08.879 --> 00:01:09.879
<v Speaker 2>I love that analogy.

26
00:01:10.040 --> 00:01:13.959
<v Speaker 1>Right, You outsource the arithmetic to this eager digital assistant,

27
00:01:14.319 --> 00:01:18.400
<v Speaker 1>which frees up your cognitive load to build complex simulations

28
00:01:18.480 --> 00:01:20.439
<v Speaker 1>and uncover hidden patterns.

29
00:01:20.560 --> 00:01:24.120
<v Speaker 2>It represents a fundamental paradigm shift in how we approach numbers.

30
00:01:24.840 --> 00:01:28.640
<v Speaker 2>You transition from being a biological calculator, which, let's be honest,

31
00:01:28.719 --> 00:01:30.439
<v Speaker 2>humans are frankly terrible.

32
00:01:30.159 --> 00:01:33.280
<v Speaker 1>Are we really are? We make so many tiny mistakes exactly.

33
00:01:33.319 --> 00:01:36.239
<v Speaker 2>You go from that to being a mathematical director. You're

34
00:01:36.319 --> 00:01:39.159
<v Speaker 2>orchestrating the logic while the machine handles the brute force.

35
00:01:39.439 --> 00:01:41.799
<v Speaker 1>But to wield that bulldozer, you know, you have to

36
00:01:41.879 --> 00:01:45.159
<v Speaker 1>learn how to speak the machine's language first. And Python

37
00:01:45.400 --> 00:01:49.400
<v Speaker 1>for all its flexibility, well, it requires strict mathematical hygiene.

38
00:01:49.480 --> 00:01:50.400
<v Speaker 2>Yeah, very strict.

39
00:01:50.439 --> 00:01:53.319
<v Speaker 1>We aren't just talking about basic arithmetic order of operations

40
00:01:53.319 --> 00:01:56.319
<v Speaker 1>here like pemdas. We are talking about how the language

41
00:01:56.359 --> 00:01:59.079
<v Speaker 1>fundamentally categorizes data, right.

42
00:01:58.879 --> 00:02:00.840
<v Speaker 2>Because to a human mind, and the number three is

43
00:02:00.920 --> 00:02:03.959
<v Speaker 2>just it's just the concept of three. Sure, whether it's

44
00:02:03.959 --> 00:02:06.120
<v Speaker 2>written as a single digit or three point zero, or

45
00:02:06.159 --> 00:02:09.599
<v Speaker 2>as a fraction like three over one. Our brains process

46
00:02:09.639 --> 00:02:14.560
<v Speaker 2>it is the exact same mathematical value, but Python allocates

47
00:02:14.680 --> 00:02:19.759
<v Speaker 2>memory and operations differently depending on this specific type of data.

48
00:02:19.840 --> 00:02:23.159
<v Speaker 1>Python distinguishes really strictly between an integer, which is an

49
00:02:23.159 --> 00:02:25.759
<v Speaker 1>inlet like three, and a floating point number, so a

50
00:02:25.759 --> 00:02:26.840
<v Speaker 1>float like three point.

51
00:02:26.719 --> 00:02:27.199
<v Speaker 2>Zero, right.

52
00:02:27.639 --> 00:02:30.400
<v Speaker 1>And I think a lot of people initially view this

53
00:02:30.599 --> 00:02:33.800
<v Speaker 1>as Python just being pedantic. You write a script, you

54
00:02:33.879 --> 00:02:36.919
<v Speaker 1>expect a whole number, a user inputs a decimal, and

55
00:02:36.960 --> 00:02:37.919
<v Speaker 1>the whole program just.

56
00:02:37.879 --> 00:02:39.159
<v Speaker 2>Crashes, It just halts.

57
00:02:39.520 --> 00:02:42.199
<v Speaker 1>It feels like you are dealing with a highly skilled

58
00:02:42.280 --> 00:02:46.759
<v Speaker 1>but entirely literal minded chef. Like if a recipe calls

59
00:02:46.759 --> 00:02:49.360
<v Speaker 1>for a whole egg and integer and you hand them

60
00:02:49.360 --> 00:02:51.319
<v Speaker 1>a scrambled egg afloat, they won't know what to do

61
00:02:51.360 --> 00:02:52.240
<v Speaker 1>and they'll just throw a fit.

62
00:02:52.319 --> 00:02:54.000
<v Speaker 2>That's a great way to put it, And that fit

63
00:02:54.080 --> 00:02:56.479
<v Speaker 2>Python throws is what we call an exception, right and exception.

64
00:02:56.560 --> 00:02:59.319
<v Speaker 2>What's fascinating here is that this strict type casting is

65
00:02:59.319 --> 00:03:03.400
<v Speaker 2>actually a brilliant enforcer of mathematical rigor. Python gets even

66
00:03:03.439 --> 00:03:06.039
<v Speaker 2>more granular than just integers and floats. Actually, oh really,

67
00:03:06.120 --> 00:03:09.000
<v Speaker 2>like how well you can work with explicit fractions using

68
00:03:09.000 --> 00:03:12.439
<v Speaker 2>the format fraction three four, and it even handles complex

69
00:03:12.520 --> 00:03:13.719
<v Speaker 2>numbers natively.

70
00:03:13.560 --> 00:03:16.680
<v Speaker 1>Wait, complex numbers like with imaginary parts.

71
00:03:16.759 --> 00:03:19.280
<v Speaker 2>Yeah, it uses J instead of I, so you'll see

72
00:03:19.280 --> 00:03:21.599
<v Speaker 2>outputs like two plus three J right there in the console.

73
00:03:21.719 --> 00:03:24.840
<v Speaker 1>Wow, which is an incredible powerful feature for you know,

74
00:03:24.919 --> 00:03:26.759
<v Speaker 1>engineering and physics applications.

75
00:03:26.840 --> 00:03:27.919
<v Speaker 2>Absolutely, But the.

76
00:03:27.879 --> 00:03:31.719
<v Speaker 1>Friction always happens at the point of user input, doesn't it.

77
00:03:32.120 --> 00:03:34.400
<v Speaker 1>When you ask a user to type a variable into

78
00:03:34.400 --> 00:03:37.280
<v Speaker 1>your program, Python reads that input as a string of

79
00:03:37.319 --> 00:03:38.039
<v Speaker 1>text by.

80
00:03:37.879 --> 00:03:40.400
<v Speaker 2>Default, right, It sees the character three fight not the

81
00:03:40.439 --> 00:03:41.719
<v Speaker 2>mathematical value.

82
00:03:41.400 --> 00:03:44.560
<v Speaker 1>Of three, So the programmer has to explicitly convert that

83
00:03:44.639 --> 00:03:47.599
<v Speaker 1>text string into the correct mathematical type.

84
00:03:47.680 --> 00:03:50.840
<v Speaker 2>And if you mismanage that conversion, you trigger one of

85
00:03:50.840 --> 00:03:53.879
<v Speaker 2>those exceptions. I mean, if the user inputs a fraction

86
00:03:54.000 --> 00:03:56.680
<v Speaker 2>string like thirty four and your code blindly tries to

87
00:03:56.719 --> 00:04:00.759
<v Speaker 2>cast that directly into an integer, Python raises value.

88
00:04:00.479 --> 00:04:02.199
<v Speaker 1>Air it just panics exactly.

89
00:04:02.800 --> 00:04:05.840
<v Speaker 2>Or if you're annoying formula inadvertently allows a zero to

90
00:04:05.840 --> 00:04:08.680
<v Speaker 2>slip into the denominator of a calculation, you trigger a

91
00:04:08.759 --> 00:04:09.800
<v Speaker 2>zero division error.

92
00:04:09.840 --> 00:04:11.840
<v Speaker 1>I want to look closely at how the source material

93
00:04:11.879 --> 00:04:15.800
<v Speaker 1>handles this, because using these try accept blocks in Python

94
00:04:15.879 --> 00:04:19.279
<v Speaker 1>to manage these errors. It isn't just a band aid

95
00:04:19.360 --> 00:04:20.439
<v Speaker 1>for bad user.

96
00:04:20.240 --> 00:04:21.639
<v Speaker 2>Input, No, not at all.

97
00:04:21.839 --> 00:04:25.279
<v Speaker 1>It forces you to rigorously define the mathematical parameters of

98
00:04:25.319 --> 00:04:29.600
<v Speaker 1>your environment. You're actively building the domain restrictions of your function.

99
00:04:29.920 --> 00:04:32.480
<v Speaker 2>That is the perfect way to frame it. Anticipating a

100
00:04:32.560 --> 00:04:35.879
<v Speaker 2>zero division error means you have to deeply understand the

101
00:04:35.920 --> 00:04:39.720
<v Speaker 2>assymp totes right, and the undefined behavior of the formula

102
00:04:39.759 --> 00:04:40.360
<v Speaker 2>you're modeling.

103
00:04:40.399 --> 00:04:41.800
<v Speaker 1>You have to know where the math breaks.

104
00:04:41.920 --> 00:04:44.319
<v Speaker 2>Yes, you have to teach the computer how to handle

105
00:04:44.319 --> 00:04:49.439
<v Speaker 2>mathematical impossibilities gracefully. Working through those exceptions builds a structural

106
00:04:49.519 --> 00:04:53.600
<v Speaker 2>understanding of mathematical rules that is just It's far deeper

107
00:04:53.600 --> 00:04:56.199
<v Speaker 2>than just skipping over a tricky problem on a paper worksheet.

108
00:04:56.560 --> 00:04:59.879
<v Speaker 1>So once we've established these strict guard rails and define

109
00:05:00.120 --> 00:05:04.319
<v Speaker 1>mathematical domains, the real power of the language unlocks. We

110
00:05:04.360 --> 00:05:08.879
<v Speaker 1>move from executing single isolated commands to automating the.

111
00:05:08.839 --> 00:05:11.040
<v Speaker 2>Tedium because why do the same thing twice?

112
00:05:11.279 --> 00:05:14.439
<v Speaker 1>Right. Once you can communicate the logic of a calculation

113
00:05:14.560 --> 00:05:18.199
<v Speaker 1>to Python perfectly, there is absolutely no reason to ever

114
00:05:18.360 --> 00:05:20.079
<v Speaker 1>do that calculation by hand again.

115
00:05:20.399 --> 00:05:23.360
<v Speaker 2>And this is where we start utilizing loops by pairing

116
00:05:23.439 --> 00:05:26.120
<v Speaker 2>a four loop with a range function, you shift your

117
00:05:26.160 --> 00:05:29.560
<v Speaker 2>focus from finite problem solving to infinite generation.

118
00:05:29.839 --> 00:05:33.040
<v Speaker 1>So instead of calculating a single multiplication problem, you just

119
00:05:33.120 --> 00:05:37.240
<v Speaker 1>instruct Python to generate endless multiplication tables in like a

120
00:05:37.279 --> 00:05:37.920
<v Speaker 1>fraction of a.

121
00:05:37.879 --> 00:05:41.079
<v Speaker 2>Second, exactly, you can write a loop that calculates all

122
00:05:41.160 --> 00:05:45.160
<v Speaker 2>the factors of a massive multi digit integer almost instantly.

123
00:05:45.279 --> 00:05:48.560
<v Speaker 1>Think about the application for unit conversion two. The text

124
00:05:48.639 --> 00:05:51.480
<v Speaker 1>uses the example of comparing a temperature of eighty six

125
00:05:51.519 --> 00:05:55.160
<v Speaker 1>degrees fahrenheit against three zho three point one five kelvin.

126
00:05:54.959 --> 00:05:58.240
<v Speaker 2>Which is mathematically impossible to analyze in its raw state.

127
00:05:58.360 --> 00:05:59.480
<v Speaker 1>Right, it's apples and oranges.

128
00:05:59.600 --> 00:06:02.360
<v Speaker 2>Yeah, I have to mathematically standardize the space before any

129
00:06:02.519 --> 00:06:04.240
<v Speaker 2>logical comparison can occur. Soe.

130
00:06:04.240 --> 00:06:06.759
<v Speaker 1>You write a quick Python script that asks the user

131
00:06:06.800 --> 00:06:10.319
<v Speaker 1>for the value, applies the appropriate conversion formula, and spits

132
00:06:10.319 --> 00:06:11.439
<v Speaker 1>out the standardized result.

133
00:06:11.560 --> 00:06:12.800
<v Speaker 2>It does the heavy lifting for you.

134
00:06:13.000 --> 00:06:17.000
<v Speaker 1>But okay, let's unpack this. The source material spends significant

135
00:06:17.040 --> 00:06:21.480
<v Speaker 1>time detailing how to program the quadratic formula. We're talking

136
00:06:21.480 --> 00:06:25.120
<v Speaker 1>about finding the roots for the classic algebra equation x

137
00:06:25.160 --> 00:06:27.959
<v Speaker 1>squared plus b x plus c equals zero.

138
00:06:28.120 --> 00:06:29.759
<v Speaker 2>Right, A staple of high school math.

139
00:06:29.879 --> 00:06:34.000
<v Speaker 1>Yeah, and it breaks down the process systematically, first calculating

140
00:06:34.000 --> 00:06:35.680
<v Speaker 1>the discriminate ah.

141
00:06:35.360 --> 00:06:37.399
<v Speaker 2>The D equals B squared minus four x.

142
00:06:37.360 --> 00:06:40.160
<v Speaker 1>Part yes, that portion of the formula, and then using

143
00:06:40.160 --> 00:06:42.759
<v Speaker 1>that isolated value to find the two roots.

144
00:06:42.800 --> 00:06:45.399
<v Speaker 2>And it leverages that native complex number support we mentioned

145
00:06:45.439 --> 00:06:46.160
<v Speaker 2>earlier too.

146
00:06:46.199 --> 00:06:48.560
<v Speaker 1>Right, Like if you enter one one in one for

147
00:06:48.600 --> 00:06:51.439
<v Speaker 1>the A, B, and C variables, Python doesn't panic because

148
00:06:51.439 --> 00:06:52.680
<v Speaker 1>the discriminant is negative.

149
00:06:52.759 --> 00:06:56.279
<v Speaker 2>No, it just calmly outputs complex roots like negative point

150
00:06:56.319 --> 00:06:57.959
<v Speaker 2>five plus point eight sixt six. J.

151
00:06:58.199 --> 00:07:00.319
<v Speaker 1>It's so cool, But uh, I have to play the

152
00:07:00.319 --> 00:07:02.160
<v Speaker 1>devil's advocate for a second here. Sure, go for it

153
00:07:02.199 --> 00:07:05.199
<v Speaker 1>if you're a student, isn't writing a quadratic equation solver

154
00:07:05.399 --> 00:07:07.920
<v Speaker 1>just a highly engineered way to cheat at your homework?

155
00:07:07.959 --> 00:07:09.839
<v Speaker 1>I mean, you plug in the variables, the machine gives

156
00:07:09.839 --> 00:07:12.199
<v Speaker 1>you the answer, and you learn nothing about the actual math.

157
00:07:12.480 --> 00:07:16.000
<v Speaker 2>Well, if we connect this to the bigger picture, writing

158
00:07:16.040 --> 00:07:20.360
<v Speaker 2>this solver algorithm requires a significantly higher level of mathematical

159
00:07:20.439 --> 00:07:23.920
<v Speaker 2>mastery than just executing the formula.

160
00:07:23.480 --> 00:07:26.800
<v Speaker 1>On paper, because you are building the architecture, not just

161
00:07:26.920 --> 00:07:27.639
<v Speaker 1>turning the crank.

162
00:07:27.680 --> 00:07:31.759
<v Speaker 2>Precisely when you solve a single quadratic equation on paper,

163
00:07:32.279 --> 00:07:35.639
<v Speaker 2>you're just plugging numbers into a pre existing machine. But

164
00:07:35.759 --> 00:07:40.240
<v Speaker 2>by programming the quadratic formula, you aren't solving a single equation.

165
00:07:40.000 --> 00:07:40.920
<v Speaker 1>You're solving all of them.

166
00:07:41.040 --> 00:07:44.319
<v Speaker 2>Yes, you are teaching a machine how to solve every

167
00:07:44.399 --> 00:07:47.920
<v Speaker 2>quadratic equation in existence. You have to break the formula

168
00:07:47.959 --> 00:07:52.519
<v Speaker 2>down into his constituent logical components, define the variables, handle

169
00:07:52.560 --> 00:07:54.560
<v Speaker 2>the discriminate operation separately, and.

170
00:07:54.519 --> 00:07:57.360
<v Speaker 1>Account for those complex route pathways if the number goes

171
00:07:57.399 --> 00:07:58.439
<v Speaker 1>negative exactly.

172
00:07:58.879 --> 00:08:01.439
<v Speaker 2>That requires a level of algorithmic master read that goes

173
00:08:01.480 --> 00:08:03.920
<v Speaker 2>far beyond just plugging numbers into a test.

174
00:08:04.040 --> 00:08:06.040
<v Speaker 1>You're stepping out of the role of the calculator and

175
00:08:06.079 --> 00:08:08.360
<v Speaker 1>into the role of the mathematician. You really are, but

176
00:08:08.560 --> 00:08:10.959
<v Speaker 1>you know, building an algorithmic engine that can spit out

177
00:08:11.120 --> 00:08:15.360
<v Speaker 1>thousands of complex roots or endless multiplication tables, it introduces a.

178
00:08:15.279 --> 00:08:16.639
<v Speaker 2>New problem, beta overload.

179
00:08:16.959 --> 00:08:20.560
<v Speaker 1>Staring at a terminal window scrolling with thousands of calculated

180
00:08:20.600 --> 00:08:24.680
<v Speaker 1>integers is completely useless to the human brain. To actually

181
00:08:24.800 --> 00:08:27.519
<v Speaker 1>understand data at that scale, we have to stop reading

182
00:08:27.600 --> 00:08:29.720
<v Speaker 1>numbers and start looking at shapes.

183
00:08:29.360 --> 00:08:33.600
<v Speaker 2>Which brings us to data visualization. Specifically, the map plot

184
00:08:33.600 --> 00:08:36.039
<v Speaker 2>lib package and Python and its pipe plot module.

185
00:08:36.159 --> 00:08:38.919
<v Speaker 1>Yes, this is how we map those massive arrays of

186
00:08:39.000 --> 00:08:42.039
<v Speaker 1>numbers onto a Cartesian coordinate plane.

187
00:08:42.120 --> 00:08:45.200
<v Speaker 2>The source material uses a brilliant, highly relatable example to

188
00:08:45.200 --> 00:08:49.080
<v Speaker 2>demonstrate this. Actually, it uses historical temperature data from Central

189
00:08:49.120 --> 00:08:50.039
<v Speaker 2>Park in New York City.

190
00:08:50.399 --> 00:08:53.600
<v Speaker 1>Oh right, the data set tracking the average annual temperatures

191
00:08:53.639 --> 00:08:55.559
<v Speaker 1>between the years twenty twenty twelve.

192
00:08:55.639 --> 00:08:58.279
<v Speaker 2>Yeah, and it's a relatively small data set, just thirteen

193
00:08:58.440 --> 00:09:01.320
<v Speaker 2>data points, ranging from a low of fifty three point

194
00:09:01.440 --> 00:09:04.200
<v Speaker 2>nine degrees to a high of fifty seven point three

195
00:09:04.200 --> 00:09:05.080
<v Speaker 2>degrees fahrenheit.

196
00:09:05.200 --> 00:09:07.159
<v Speaker 1>Now, if you just look at that data in a spreadsheet,

197
00:09:07.200 --> 00:09:10.240
<v Speaker 1>it's just a block of text. It's totally static.

198
00:09:10.000 --> 00:09:10.960
<v Speaker 2>Just numbers on a screen.

199
00:09:11.159 --> 00:09:13.960
<v Speaker 1>But when you feed that array into matt plotlib, you

200
00:09:14.000 --> 00:09:17.399
<v Speaker 1>map the years onto the x axis and the temperatures

201
00:09:17.399 --> 00:09:20.080
<v Speaker 1>onto the y axis. The text even shows how you

202
00:09:20.080 --> 00:09:23.840
<v Speaker 1>can layer the monthly temperature data for multiple specific years,

203
00:09:23.879 --> 00:09:26.960
<v Speaker 1>say two thousand and twenty six and twenty twelve, all

204
00:09:27.039 --> 00:09:28.519
<v Speaker 1>onto the exact same graph.

205
00:09:28.639 --> 00:09:31.240
<v Speaker 2>Right. You assign different colors to each tear's line. You

206
00:09:31.360 --> 00:09:33.759
<v Speaker 2>generate a legend so the viewer knows what they're looking at.

207
00:09:33.919 --> 00:09:36.279
<v Speaker 1>You define the title and the axis labels.

208
00:09:35.960 --> 00:09:39.360
<v Speaker 2>And suddenly the deity yields a narrative. You can visually

209
00:09:39.440 --> 00:09:43.720
<v Speaker 2>identify these distinct sharp peaks occurring every July across all

210
00:09:43.720 --> 00:09:44.320
<v Speaker 2>three years.

211
00:09:44.679 --> 00:09:48.279
<v Speaker 1>It immediately transforms raw numbers into a clear story about

212
00:09:48.279 --> 00:09:50.639
<v Speaker 1>seasonal variance and historical warming trends.

213
00:09:50.720 --> 00:09:52.440
<v Speaker 2>It's incredibly satisfying to see.

214
00:09:52.559 --> 00:09:55.279
<v Speaker 1>But here's where it gets really interesting, and the book

215
00:09:55.320 --> 00:09:58.960
<v Speaker 1>highlights a major trap in data visualization that programmers fall

216
00:09:58.960 --> 00:10:00.080
<v Speaker 1>into all the time.

217
00:10:00.200 --> 00:10:00.919
<v Speaker 2>The scaling issue.

218
00:10:01.000 --> 00:10:04.480
<v Speaker 1>Yes, when you feed that initial annual Central Park data

219
00:10:04.519 --> 00:10:07.200
<v Speaker 1>into matplot lib and rely on the default settings, the

220
00:10:07.279 --> 00:10:10.799
<v Speaker 1>resulting graph looks like a violent, dramatic roll and coaster

221
00:10:10.919 --> 00:10:12.440
<v Speaker 1>of extreme temperature shifts.

222
00:10:12.519 --> 00:10:16.799
<v Speaker 2>The visual spikes and drops appear massive, almost catastrophic.

223
00:10:16.159 --> 00:10:20.759
<v Speaker 1>Really, but it's an optical illusion. The software automatically optimizes

224
00:10:20.759 --> 00:10:24.039
<v Speaker 1>the visual variants by zooming the y axis in incredibly

225
00:10:24.120 --> 00:10:25.120
<v Speaker 1>tightly around the data.

226
00:10:25.240 --> 00:10:27.039
<v Speaker 2>Right, it tries to fill the space exactly.

227
00:10:27.399 --> 00:10:29.840
<v Speaker 1>The bottom boundary of the graph defaults to fifty three

228
00:10:29.879 --> 00:10:32.720
<v Speaker 1>point zero degrees and the top boundary is set just

229
00:10:32.759 --> 00:10:36.600
<v Speaker 1>above fifty seven point five degrees. It takes a relatively

230
00:10:36.679 --> 00:10:40.159
<v Speaker 1>narrow four degree band of variants and stretches it vertically

231
00:10:40.240 --> 00:10:42.240
<v Speaker 1>to fill the entire visual field.

232
00:10:42.519 --> 00:10:45.799
<v Speaker 2>This raises an important question about modern data literacy. Honestly,

233
00:10:46.639 --> 00:10:50.600
<v Speaker 2>when media outlets or social media platforms publish charts, they

234
00:10:50.679 --> 00:10:56.039
<v Speaker 2>frequently rely on or intentionally exploit these exact default scaling behaviors.

235
00:10:56.159 --> 00:10:57.080
<v Speaker 1>Happens all the time.

236
00:10:57.279 --> 00:10:59.720
<v Speaker 2>If you don't understand how a graph is constructed underneath

237
00:10:59.759 --> 00:11:02.039
<v Speaker 2>the hood, you're entirely at the mercy of the person

238
00:11:02.080 --> 00:11:02.840
<v Speaker 2>who generated it.

239
00:11:02.879 --> 00:11:05.360
<v Speaker 1>They can manipulate the axis boundaries to make a minor

240
00:11:05.399 --> 00:11:09.159
<v Speaker 1>statistical fluctuation look like an unprecedented crisis.

241
00:11:08.840 --> 00:11:11.559
<v Speaker 2>Or conversely, they can flatten a massive change into a

242
00:11:11.600 --> 00:11:13.559
<v Speaker 2>straight line by zooming out too far.

243
00:11:13.799 --> 00:11:16.759
<v Speaker 1>So the defense mechanism here has to be taking manual

244
00:11:16.799 --> 00:11:19.679
<v Speaker 1>control of those visual boundaries. Does the text use the

245
00:11:19.720 --> 00:11:22.440
<v Speaker 1>axis function to just pin that y axis down to

246
00:11:22.519 --> 00:11:23.559
<v Speaker 1>a baseline of zero.

247
00:11:23.919 --> 00:11:28.240
<v Speaker 2>It does by explicitly coding the parameter i'men equal zero.

248
00:11:28.759 --> 00:11:31.519
<v Speaker 2>The programmer overrides that default zoom.

249
00:11:31.399 --> 00:11:34.159
<v Speaker 1>And the roller coaster immediately flattens out exactly.

250
00:11:34.320 --> 00:11:39.519
<v Speaker 2>The dramatic, terrifying spikes are contextualized against absolute zero, and

251
00:11:39.600 --> 00:11:43.159
<v Speaker 2>they become a gentle, much more realistic ripple at the

252
00:11:43.279 --> 00:11:44.360
<v Speaker 2>very top of the graph.

253
00:11:44.799 --> 00:11:47.559
<v Speaker 1>It proves that learning to code your own graphs is

254
00:11:47.639 --> 00:11:52.000
<v Speaker 1>a vital active defense against being misled by manipulated statistics

255
00:11:52.039 --> 00:11:52.799
<v Speaker 1>in the real world.

256
00:11:52.919 --> 00:11:54.720
<v Speaker 2>You know how the trick is performed, so you can't

257
00:11:54.759 --> 00:11:55.480
<v Speaker 2>be fooled by the.

258
00:11:55.440 --> 00:12:00.480
<v Speaker 1>Prestige That is such a critical critical thinking skill. So

259
00:12:00.639 --> 00:12:03.879
<v Speaker 1>we've successfully modeled static historical data, and we've learned to

260
00:12:03.879 --> 00:12:07.840
<v Speaker 1>defend against statistical illusions. But the ultimate test of mathematical

261
00:12:07.919 --> 00:12:11.279
<v Speaker 1>fluency is moving from static numbers to dynamic systems.

262
00:12:10.919 --> 00:12:13.519
<v Speaker 2>Stepping out of statistics and into the physical laws of

263
00:12:13.519 --> 00:12:14.120
<v Speaker 2>the universe.

264
00:12:14.200 --> 00:12:17.759
<v Speaker 1>Yes, modeling physics using mathematical formulas in Python is where

265
00:12:17.799 --> 00:12:21.000
<v Speaker 1>the language truly acts as a sandbox for reality. A

266
00:12:21.039 --> 00:12:23.759
<v Speaker 1>foundational example from the text is plotting Newton's law of

267
00:12:23.879 --> 00:12:25.440
<v Speaker 1>universe gravitation AH.

268
00:12:25.480 --> 00:12:28.600
<v Speaker 2>The classic formula F equals G times M one times

269
00:12:28.679 --> 00:12:31.480
<v Speaker 2>m two all divided by R squared right.

270
00:12:31.720 --> 00:12:35.120
<v Speaker 1>It calculates the gravitational force between two bodies based on

271
00:12:35.159 --> 00:12:37.679
<v Speaker 1>their masses and the distance between them, and the.

272
00:12:37.639 --> 00:12:41.120
<v Speaker 2>Script provided in the book generates an array of distances

273
00:12:41.480 --> 00:12:43.759
<v Speaker 2>iterating from one hundred meters all the way up to

274
00:12:43.840 --> 00:12:44.679
<v Speaker 2>one thousand meters.

275
00:12:44.720 --> 00:12:49.679
<v Speaker 1>When you plot that resulting gravitational force against those increasing distances.

276
00:12:50.120 --> 00:12:53.080
<v Speaker 1>You don't just see a list of decreasing numbers. You

277
00:12:53.240 --> 00:12:58.720
<v Speaker 1>visually prove the inverse proportional nonlinear relationship.

278
00:12:58.120 --> 00:12:59.559
<v Speaker 2>The inverse square law.

279
00:12:59.720 --> 00:13:03.799
<v Speaker 1>Yes, you get this perfect sweeping asymptotic curve on the

280
00:13:03.840 --> 00:13:08.159
<v Speaker 1>graph that visually demonstrates how rapidly gravity weakens as the

281
00:13:08.200 --> 00:13:09.240
<v Speaker 1>objects move apart.

282
00:13:09.399 --> 00:13:12.759
<v Speaker 2>It's a nonlinear decay, and seeing the shape of that

283
00:13:12.840 --> 00:13:16.759
<v Speaker 2>decay makes the physics intuitive in a way equations sometimes aren't.

284
00:13:16.840 --> 00:13:20.080
<v Speaker 1>It completely bridges the gap between the algebraic formula and

285
00:13:20.120 --> 00:13:21.960
<v Speaker 1>the physical reality it describes.

286
00:13:22.240 --> 00:13:26.200
<v Speaker 2>But the absolute zenith of this modeling conceptually has to

287
00:13:26.240 --> 00:13:27.879
<v Speaker 2>be the projectile motion simulation.

288
00:13:28.039 --> 00:13:30.159
<v Speaker 1>Oh I love this part so much. This brings literally

289
00:13:30.240 --> 00:13:33.799
<v Speaker 1>everything we've talked about algebra, trigonometry, loops, and visualization into

290
00:13:33.879 --> 00:13:34.919
<v Speaker 1>one single script.

291
00:13:35.080 --> 00:13:37.200
<v Speaker 2>It's the grand finale picture this.

292
00:13:37.639 --> 00:13:39.879
<v Speaker 1>You throw a ball with an initial velocity of five

293
00:13:39.960 --> 00:13:43.399
<v Speaker 1>meters per second, launched at exactly a forty five degree angle.

294
00:13:43.720 --> 00:13:46.840
<v Speaker 2>Okay, so first you have to use trigonometry, the math

295
00:13:46.879 --> 00:13:50.559
<v Speaker 2>dot cos and math dot sin functions to break that

296
00:13:50.720 --> 00:13:54.720
<v Speaker 2>single velocity vector into its horizontal and vertical components.

297
00:13:54.960 --> 00:13:58.279
<v Speaker 1>Right, because it's moving up and forward at the same time, wow,

298
00:13:58.320 --> 00:14:01.240
<v Speaker 1>and applying the constant of graph pulling it down at

299
00:14:01.279 --> 00:14:04.159
<v Speaker 1>an acceleration of nine point eight meters per second squared.

300
00:14:04.600 --> 00:14:07.759
<v Speaker 1>The basic high school physics formula tells us the total flight.

301
00:14:07.519 --> 00:14:09.759
<v Speaker 2>Time the ball will hit the ground in exactlyer point

302
00:14:09.799 --> 00:14:11.559
<v Speaker 2>seven to two one five four seconds.

303
00:14:11.600 --> 00:14:14.360
<v Speaker 1>But knowing the final destination isn't the goal here. We

304
00:14:14.440 --> 00:14:15.960
<v Speaker 1>want to map the entire journey.

305
00:14:16.039 --> 00:14:16.960
<v Speaker 2>We want to see the arc.

306
00:14:17.279 --> 00:14:20.039
<v Speaker 1>So the script utilizes a wile loop to calculate the

307
00:14:20.080 --> 00:14:24.399
<v Speaker 1>ball's exact X and y coordinates at microscopic intervals. Specifically,

308
00:14:24.519 --> 00:14:27.320
<v Speaker 1>every zero point zero zero one seconds of that.

309
00:14:27.200 --> 00:14:29.559
<v Speaker 2>Flight wow, every millisecond.

310
00:14:28.919 --> 00:14:32.480
<v Speaker 1>Every millisecond, it calculates the horizontal distance traveled in that millisecond.

311
00:14:32.799 --> 00:14:35.919
<v Speaker 1>It calculates the vertical drop caused by gravity in that millisecond,

312
00:14:36.000 --> 00:14:37.480
<v Speaker 1>plots the dot and repeats.

313
00:14:37.600 --> 00:14:40.840
<v Speaker 2>It runs that calculation hundreds of times until the vertical

314
00:14:40.879 --> 00:14:42.159
<v Speaker 2>coordinate hits zero.

315
00:14:42.639 --> 00:14:46.200
<v Speaker 1>It is essentially the exact underlying physics engine for a

316
00:14:46.279 --> 00:14:48.080
<v Speaker 1>video game like Angry Birds.

317
00:14:48.200 --> 00:14:49.279
<v Speaker 2>That's a perfect analogy.

318
00:14:49.600 --> 00:14:53.240
<v Speaker 1>You are creating a digital sandbox where you map out

319
00:14:53.360 --> 00:14:57.960
<v Speaker 1>exactly where a physical object exists in space millisecond by millisecond.

320
00:14:58.000 --> 00:15:01.679
<v Speaker 2>What's fascinating. Here is how this loop bridges the continuous

321
00:15:01.679 --> 00:15:05.200
<v Speaker 2>and the discrete. I mean, in physical reality, the ball's

322
00:15:05.279 --> 00:15:09.159
<v Speaker 2>flight is a continuous, unbroken arc, but computers can only

323
00:15:09.240 --> 00:15:13.840
<v Speaker 2>process discrete, quantified steps. By looping the calculation every point

324
00:15:13.919 --> 00:15:18.360
<v Speaker 2>zero zero one seconds, you're essentially performing rudimentary numerical integration.

325
00:15:18.639 --> 00:15:23.519
<v Speaker 1>You're slicing continuous time into tiny calculable slivers to approximate

326
00:15:23.559 --> 00:15:24.559
<v Speaker 1>reality exactly.

327
00:15:24.600 --> 00:15:27.120
<v Speaker 2>The smaller the time step, the closer your digital simulation

328
00:15:27.200 --> 00:15:29.960
<v Speaker 2>gets to the true continuous curve of the physical world.

329
00:15:30.039 --> 00:15:32.440
<v Speaker 1>It's just incredible. I mean, you are predicting the future

330
00:15:32.480 --> 00:15:35.879
<v Speaker 1>path of an object through space and time using nothing

331
00:15:35.919 --> 00:15:37.919
<v Speaker 1>but logic loops and high school math.

332
00:15:38.159 --> 00:15:41.519
<v Speaker 2>It transforms mathematics with an abstract exercise on a chalkboard

333
00:15:41.679 --> 00:15:45.720
<v Speaker 2>into a tangible mechanism for literally simulating reality. It's a superpower,

334
00:15:45.919 --> 00:15:46.519
<v Speaker 2>it really is.

335
00:15:47.320 --> 00:15:50.600
<v Speaker 1>Well, we have covered massive ground today, so let's synthesize

336
00:15:50.639 --> 00:15:53.159
<v Speaker 1>the journey we just took through Amitsaha's work.

337
00:15:53.399 --> 00:15:54.000
<v Speaker 2>Let's do it.

338
00:15:54.320 --> 00:15:59.120
<v Speaker 1>We started by exploring Python's strict mathematical hygiene right learning

339
00:15:59.159 --> 00:16:03.480
<v Speaker 1>how casting types and defining exceptions like value errors forces

340
00:16:03.559 --> 00:16:07.799
<v Speaker 1>us to truly understand the boundaries and domains of our formulas.

341
00:16:07.399 --> 00:16:12.000
<v Speaker 2>We used loops to automate algebraic algorithms, realizing that writing

342
00:16:12.039 --> 00:16:15.559
<v Speaker 2>a quadratic solver is about architecting logic, not just finding

343
00:16:15.639 --> 00:16:16.399
<v Speaker 2>a quick answer.

344
00:16:16.679 --> 00:16:21.000
<v Speaker 1>We expose the visual illusions hidden inside default data visualizations,

345
00:16:21.320 --> 00:16:25.039
<v Speaker 1>and finally, we sliced continuous time into discrete loops to

346
00:16:25.120 --> 00:16:27.879
<v Speaker 1>literally simulate the physical laws of the universe.

347
00:16:28.039 --> 00:16:30.360
<v Speaker 2>And for you listening, whether you're aggressively prepping for a

348
00:16:30.440 --> 00:16:33.440
<v Speaker 2>highly technical engineering role or you're simply deeply curious about

349
00:16:33.440 --> 00:16:36.399
<v Speaker 2>the architecture of the digital world, Adopting Python is a

350
00:16:36.399 --> 00:16:39.360
<v Speaker 2>mathematical tool represents a massive paradigm.

351
00:16:38.960 --> 00:16:40.240
<v Speaker 1>Shift that acts as a lever.

352
00:16:40.519 --> 00:16:43.960
<v Speaker 2>Yes, it lifts the exhausting mechanical burden of calculation off

353
00:16:44.000 --> 00:16:47.840
<v Speaker 2>your shoulders, allowing your intellect to focus entirely on raw innovation,

354
00:16:48.320 --> 00:16:51.200
<v Speaker 2>pattern recognition, and complex problem solving.

355
00:16:51.440 --> 00:16:54.559
<v Speaker 1>So what does this all mean? We started this deep

356
00:16:54.600 --> 00:16:57.960
<v Speaker 1>dive talking about the sheer physical exhaustion of digging a

357
00:16:58.039 --> 00:17:01.919
<v Speaker 1>foundation with a teaspoon. But if computers can now seamlessly

358
00:17:02.000 --> 00:17:05.640
<v Speaker 1>handle all the grunt work of executing complex mathematical formulas

359
00:17:05.640 --> 00:17:07.480
<v Speaker 1>and physics simulations.

360
00:17:06.839 --> 00:17:08.480
<v Speaker 2>In a fraction of a second, no less right.

361
00:17:08.519 --> 00:17:11.759
<v Speaker 1>In milliseconds, will the future of human mathematics look less

362
00:17:11.799 --> 00:17:15.559
<v Speaker 1>and less like tedious calculation and more like pure philosophy

363
00:17:15.559 --> 00:17:18.160
<v Speaker 1>and art, something for you to maul over next time

364
00:17:18.160 --> 00:17:19.960
<v Speaker 1>you reach for that yellow number two pencil
