Created
June 10, 2018 10:56
-
-
Save martin-martin/35e22fa9d35e29020a0745b8c991ad68 to your computer and use it in GitHub Desktop.
about python's basic float type
This file contains 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
# simple float calculation | |
print(42.42 / 3) | |
# mixing integers with floats yields floats | |
part_of_whole = 0.5 | |
whole = part_of_whole * 2 | |
print(whole) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment