Puzzle 2: Explanation
Let’s find out how variables and division operators work in Python.
We'll cover the following...
We'll cover the following...
Let’s try it!
Try executing the code below to verify the result:
Press + to interact
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