Puzzle 2: Explanation
Let’s find out how variables and division operators work in Python.
Let’s try it!
Try executing the code below to verify the result:
Python 3.8
π =355/113print(π)
Code explanation
There are two surprising things here:
- A valid identifier is
π
. - The code
355 / 113
computes to a float