Linguaggio Python
- linguaggio interpretato
- comandi eseguiti da un interprete
- l’interprete riceve un comando, lo valuta e ne restituisce il risultato
- codice sorgente memorizzato in un file con estensione
.py
Come funziona Python
- l’interprete svolge il ruolo di controllore sintattico e di traduttore
- il bytecode è la traduzione del codice Python in un linguaggio di basso livello
- la Python Virtual Machine esegue il bytecode
Versione Python da utilizzare
- ultima versione Python 3.10.7 //preso dalle slide dell’anno scorso, da modificare
Download Python
python -V
oppure python --version
- per sapere quale versione è installata
- se sono installate più versioni ci dice quale viene lanciata con il comando
python
Documentazione Python
3.11.5 Documentation
The Python Tutorial
Come scrivere il codice
- commento introduttivo
- import dei moduli richiesti dal programma