mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 15:24:09 +03:00
[Python] Slightly tweak ** example
2^4 == 4^2, 2^3 seems a bit less ambiguous as an example for exponentiation.
This commit is contained in:
parent
60c11f43c4
commit
e901344c04
@ -52,7 +52,7 @@ Note: This article applies to Python 3 specifically. Check out [here](http://lea
|
|||||||
7 % 3 # => 1
|
7 % 3 # => 1
|
||||||
|
|
||||||
# Exponentiation (x**y, x to the yth power)
|
# Exponentiation (x**y, x to the yth power)
|
||||||
2**4 # => 16
|
2**3 # => 8
|
||||||
|
|
||||||
# Enforce precedence with parentheses
|
# Enforce precedence with parentheses
|
||||||
(1 + 3) * 2 # => 8
|
(1 + 3) * 2 # => 8
|
||||||
|
Loading…
Reference in New Issue
Block a user