I spent a little time in the library this morning and returned in the evening. The main task was to continue with basic Python syntax. I also reorganised the roles of mathematics, programming, and English in my study plan.
One very practical problem kept getting in the way: I forgot to save what I had written. While coding, I also kept forgetting to switch between Chinese and English input. These are not difficult concepts, but they interrupt the exercise whenever the wrong characters or punctuation appear.

Describing the operators precisely
The operators I met today are brief on the page, but their meanings need more care than their informal Chinese names suggest.
/performs regular division. In Python 3, the result is represented as afloat:7 / 2gives3.5, while4 / 2gives2.0.//performs floor division.7 // 2gives3, but-7 // 2gives-4, because the quotient is rounded down toward negative infinity rather than simply truncated.%is the modulo operator. For example,7 % 2gives1. It is related to floor division bya == (a // b) * b + a % b.**is exponentiation:2 ** 3gives8.+=and-=are augmented assignments.x += 1updatesxwith the result ofx + 1;x -= 1works similarly.
At this point, I am still identifying the basic behaviour. I need to try positive values, negative values, and decimals, especially when combining // and %.
The colon after if and else
Another detail kept returning today: both the if line and the else line end with a colon. The indented lines below them form their code blocks.
score = 700
if score >= 680:
print('Congratulations on entering university')
else:
print('The exam is over')
The colon introduces a block, and indentation shows which statements belong to that branch. Remembering the condition while forgetting the colon or indentation is still enough to stop the program from working as intended.

Why 0.4 − 0.3 may not display as exactly 0.1
I noticed that after entering 0.4 and 0.3, Python printed their difference as 0.10000000000000003.
It is too broad to say that a computer uses binary and therefore always loses information. More precisely, many finite decimal fractions do not have a finite binary representation. A Python float stores a nearby binary approximation, and an operation can make that tiny approximation error visible.
x = 0.4
y = 0.3
print(x + y) # 0.7
print(x - y) # 0.10000000000000003
For comparisons where “close enough” is appropriate, Python provides math.isclose(). Situations such as money, where exact decimal representation matters, are a reason to learn about decimal.Decimal. For now, I have identified the source of the output; I have not mastered floating-point arithmetic.

0.4 − 0.3 makes the floating-point approximation visible.Clarifying the main line of study
I also adjusted my study strategy today. My university text should be the main line: follow the definitions, theorems, examples, and assignments in the course, and build the foundation of the degree first.
Abbott's Understanding Analysis will serve as a second pass. It is not replacing the university text, nor is it a book I need to race through. Its role is to train my attention on rigorous definitions, why a theorem is true, and how a proof is written. Returning to the corresponding section when the university course reaches a related topic should make that role clearer.
Python and English remain in the plan. Python lets me practise expressing calculations and processes; English belongs inside the concrete setting of textbooks, terminology, and source reading. This gives me one course-centred main line, supported by analysis, programming, and English, rather than four equally heavy tracks competing at once.

Before the next coding session, I need to check the input method and save the file before running it. At the end, I can record three short points: what I tried, what remains uncertain, and where to resume. That is more concrete than becoming annoyed only after unsaved work disappears.
Enough for today.
Comments
0 comments