mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-22 23:01:41 +03:00
[python/en] added int div, modulo, and scoping
Added integer or truncation division, the modulo operator which were missing from operators section. Added function scoping in the functions section.
This commit is contained in:
parent
2a9a4f39ba
commit
0dcc5640b6
@ -47,7 +47,7 @@ to Python 2.x. Look for another tour of Python 3 soon!
|
||||
|
||||
# Truncation or Integer division
|
||||
5 // 3 # => 1
|
||||
5.0 // 3.0 # => 1.0
|
||||
5.0 // 3.0 # => 1.0 # works on floats too
|
||||
|
||||
# Modulo operation
|
||||
7 % 3 # => 1
|
||||
|
Loading…
Reference in New Issue
Block a user