Created
January 1, 2020 18:31
-
-
Save edenau/275f2514f45b3a5296c4b6fc9396f128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 6 | |
# The following statement | |
# assigns the value a ** 2 to variable b, | |
# and then check if b > 0 is true | |
if (b := a ** 2) > 0: | |
print(f'The square of {a} is {b}.') # The square of 6 is 36. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment