Python is a Calculator
I can hear you say, "All programming languages can calculate". But python does it in easy syntax.
5 plus 7 is 12, 13 times 15 is 195, 1 divided by 5 is 0.2. Easy. Repeating or periodic numbers are printed in a longer format. Let's try minus 2 divided by 3. In math theory, when 2 is divided by 3, the digit 3 repeats forever after the decimal point.
πππClick Read more
>>> print (5+7)
12
>>> print (13*15)
195
>>> print (-2/3)
-0.6666666666666666
>>> print (1/5)
0.2
No comments:
Post a Comment
Your comment will taken into consideration.