Python: Quick Reference ¶ Variables Arithmetic operators Objects Size of an object Loops Conditionals Logical and Boolean operators Double list List operations Functions Random number Variables In [ ]: number = 5 # integer real = - 3.4 # float name = 'Asja' # string surname = "Sarkana" # string boolean1 = True # Boolean boolean1 = False # Boolean Arithmetic operators Basic operators In [ ]: a = 13 b = 5 print ( "a =" , a ) print ( "b =" , b ) print () # basics operators print ( "a + b =" , a + b ) print ( "a - b =" , a - b ) print ( "a * b =" , a * b ) print ( "a / b =" , a / b ) Integer division and modulus operators In [ ]: a = 13 b = 5 print ( "a =...
Trainer in AlMadinah Institute
Comments
Post a Comment