Drop hier links of afbeeldingen om ze aan de editor toe te voegen.

Een int (geheel getal) of float (kommagetal) druk je af met print():

print(5)      # drukt: 5
print(0.2)    # drukt: 0.2
print(5, 0.2) # drukt: 5 0.2

Let op: in Python is print(3, 14) iets anders dan print(3.14)!

  • print(3, 14) drukt twee getallen af: 3 14 (met spatie)
  • print(3.14) drukt het kommagetal 3.14 af