Erste Beispiele
Addition
>>> 5+7
12
>>> 23+(-12)
11
Division
#Gleitzahldivision
>>>7/5
1.4
#Ganzzahldivision
>>>7//5
1
#Restwertdivision - Modulo
>>>7%5
2
#Endliche Gletkommadarstellung
>>>1/3
0.3333333333333333
Vergleichsaudrücke
>>>4<12
True
>>>2==7
False
>>>5==5
True
>>>not(5==5)
False
>>>not(3!=3)
True
>>>not(3<8) or (9>8)
True
Lizenziert unter Creative Commons Attribution Share Alike License 4.0