Benutzer-Werkzeuge

Webseiten-Werkzeuge


kicoku:kicokusommer2023

Dies ist eine alte Version des Dokuments!


KiCoKu Sommer 2023

Python

Installation: Python für Windows

Test der Installation

Eingabe in einen Python Interpreter

>>>1+2+3
   6
>>>print("Hallo Du")
   Hallo Du

Berechnungen

Eingabe in einen Python Interpreter

>>>1 + 1
   2
>>>3 - 2
   1
>>>4 * 4
   16
>>>8 / 4
   2.0
>>>7 / 4
   1.75
>>>7 // 4
   1
>>>7 % 4
   3
>>>4 ** 2
   16
>>>8 - 2 * 3
   2
>>>( 8 - 2 ) * 3
   18

Text Ein und Ausgabe

Eingabe der Python IDLE und Ausführen (mit F5)

# YourName.py
name = input("What is your name?\n")
print("Hi, ", name, name, name, name, name)

Bildschirmausgabe:

What is your name?
Wolfgang
Hi,  Wolfgang Wolfgang Wolfgang Wolfgang Wolfgang
kicoku/kicokusommer2023.1691823999.txt.gz · Zuletzt geändert: 2023/08/12 09:06 von newo