"Stupid methodology Python" 3. Numbers and mathematical calculations

Here Insert Picture DescriptionHere Insert Picture Description
Consolidation exercise:
1. To write code comments (just write a few words in front):Here Insert Picture Description

2. Run the powershell in python, computational mathematics formula script. Some special in that:
(1) 25 + 30/6 Results for decimal, is 30.0, Python is obtained in floating-point division;
(2)% modulo still, / is in addition, different from the C language is taken integrin;
(3) determining <,> result returns true or false, 1 or 0 of the difference between the C language.
(4) <,> the lowest priority, should pay attention to this point.

Guess you like

Origin blog.csdn.net/weixin_45069175/article/details/90272413