Skip to content

Instantly share code, notes, and snippets.

@khalid32
Created September 5, 2022 05:10
Show Gist options
  • Save khalid32/2d8b8ca023807e4ef31292dbf5bbb1ed to your computer and use it in GitHub Desktop.
Save khalid32/2d8b8ca023807e4ef31292dbf5bbb1ed to your computer and use it in GitHub Desktop.
** The abs Function
abs(3) ==> 3
abs(0) ==> 0
abs(-3) ==> 3
** The int Function
int(2.7) ==> 2
int(-2.7) ==> -2
** The round() Function
round(2.7) ==> 3 // Goes to the upper number; NOT lower number
round(2.317, 2) ==> 2.32 // if its above 5, then it will go to upper number. else go to lower number
== Augmented Assignment ==
value = value + 1 OR value += 1
== Two Other Integer Operations ==
1. Integer division Operator ( // )
2. Modulus Operator ( % )
=== Indics and Slices ===
print("Python"[3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment