
Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Prepara i tuoi esami
Studia grazie alle numerose risorse presenti su Docsity
Prepara i tuoi esami con i documenti condivisi da studenti come te su Docsity
Trova i documenti specifici per gli esami della tua università
Preparati con lezioni e prove svolte basate sui programmi universitari!
Rispondi a reali domande d’esame e scopri la tua preparazione
Riassumi i tuoi documenti, fagli domande, convertili in quiz e mappe concettuali
Studia con prove svolte, tesine e consigli utili
Togliti ogni dubbio leggendo le risposte alle domande fatte da altri studenti come te
Esplora i documenti più scaricati per gli argomenti di studio più popolari
Ottieni i punti per scaricare
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Una lista di parole chiave del linguaggio di programmazione Python, con una breve descrizione di ciascuna. Le parole chiave includono 'if', 'else', 'return', 'class', 'import', 'break', 'continue', 'for', 'while', 'and', 'or', 'in', 'is', 'not', 'pass', 'del', 'try', 'except'. Il documento può essere utile come riassunto per uno studente che sta imparando Python o come riferimento rapido per un programmatore esperto.
Tipologia: Schemi e mappe concettuali
1 / 1
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!

False - boolean boolean expression True - boolean boolean expression elif if condition1: statement1… elif condition2: statement2… else: statement3 condition if the condition1 is true it executes the statement1, if the condition2 it executes the statement2, otherwise it executes statement else if condition: statement1… else: statement2… condition if the condition is true it executes the statement1, otherwise it executes statement if if condition: statement statement2 condition if the condition is true it executes the statements return return value define it exits the function at that point and return the results of "value" class class class_name(par ameters): define it defines a class def def function_name( parameters): define it defines a function or method of a class parameters can be absent (); you can have a default parameter if you use the = import import module^ import it imports modules that are not built-in break break iteration interrupts a loop when a a specific condition occurs it's used with "while" and "for" continue continue iteration move to the next loop iteration when a specific contition occurs it's used with "while" and "for" for for variable in [a,b,c…]: statement statement2… iteration it creates a loop controlled by a counter it executes the statements for each value of the variable included in the sequence while while condition: statement statement2… iteration it executes the statements as long as the condition is true if the loop is infinite use "while True" and then and "if"+condition with "break" and x and y operator it returns true if both x and y are true in x in y^ operator it checks if an element is in a sequence or container is x is y operator it checks that 2 objects are the same in memory if you just have to check the equality use == not not x operator if returns true if x is false or x or y operator it returns true if either x or y is true pass pass other acts as a marker for the code which is going to be completed, avoiding that incomplete constructs return an error when we want to test the program or go along with the next statements, without concluding a certain part del del object other it deletes an object or part of an object its common use is to remove indexes from a list or dictionary try … except try: statements except: statements other it tries to perform an action except if a (specified) error occurs you can use multiple "except"