DigiGreen Manufacturing base (48 h) – GP5
- tenuto da Grigolo Pietro e-mail grigolopi@gmail.com
- Corso_python_base
- Programma del corso:
- Introduzione e Storia
- L'interprete Python e l'IDLE
- Sintassi
- Tipi di dato semplici
- Cicli Interattivi e Iterativi
- Funzioni, moduli e oggetti
- Strutture dati: list, tuple, set, dictionary
- Gestione delle stringhe, dei file e dell'input da terminale
- Installazione e uso del package manager PIP
- Python come moderno linguaggio di Scripting
- Progetto Automobile
- Programma del corso:
Vecchio logo
Cosa si può fare con python:
-
Filosofia di python:
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
-
Nascita di python:
- Linguaggi interpretati VS linguaggi compilati esempio C++
- Interprete python articolo in inglese
- Guida intergalattica al terminale aka la riga di comando linuxcommand.org
slide Le parole e i simboli che fanno il linguaggio.
codice con esempi da lanciare, modificare e rilanciare!
Esercizio Proposto prevede di gestire il ritorno della funzione tempo() assegnandolo a una variabile per poi poterci svolgere operazioni algebriche.
Esempio di un notebook jupyter Notebook jupyter.
- Per installare la libreria:
pip install jupyter
esercizi liste esercizi dictionary
Altra libreria molto ricca di funzionalità che può leggere e manipolare dati da file è Pandas
Classi e oggetti, Object Oriented
esempio FastAPI simile a quello fatto a lezione. Da finire e integrare
Il file main con il la signature e docstring delle funzioni finora pensate è main_automobili