English
Summary
Conclusions
A Python name refers to an object with its own type. Numeric calculations require the right choice of type, units, and rounding rule. Input starts as text, so conversion and validation must be explicit. Branches determine the execution path, while loops let you apply an algorithm to a series of values without duplicating code.
Self-check questions
- What changes when a name is reassigned?
- How do
==andisdiffer? - What precision limitations do
intandfloathave? - Why does
0.1 + 0.2 == 0.3return false? - When should you use integer kopiykas or Decimal?
- Why is
bool("False")true? - How does
//for negative numbers differ from truncation? - How does short-circuit evaluation protect against division by zero?
- How does format validation differ from range validation?
- When can several
ifstatements not be replaced with anelifchain? - What does a bare name after
casemean? - Which numbers does
range(8, 1, -3)specify? - When does a loop's
elserun? - Why can a series minimum not always start at zero?
- What reference data do you need to test every branch?