Esercitazione Python

Python HOME Introduzione di Python Python per iniziare Sintassi Python Commenti Python Variabili Python Tipi di dati Python Numeri Python Fusione in pitone Stringhe Python Python booleani Operatori Python Elenchi Python Tuple di Python Insiemi Python Dizionari Python Python Se... Altro Python While Loops Python per loop Funzioni Python Python Lambda Matrici Python Classi/oggetti Python Ereditarietà Python Iteratori Python Ambito Python Moduli Python Date Python Python matematica Python JSON Python RegEx PIP Python Python Prova... Tranne Input utente Python Formattazione di stringhe Python

Gestione dei file

Gestione dei file Python File di lettura Python Python Scrivi/Crea file Python Elimina file

Moduli Python

Tutorial NumPy Procedura dettagliata di Panda Tutorial Scipy

Python Matplotlib

Introduzione a Matplotlib Matplotlib Inizia Plottaggio Matplotlib Tracciatura Matplotlib Marcatori Matplotlib Linea Matplotlib Etichette Matplotlib Griglia Matplotlib Sottotrame Matplotlib Dispersione Matplotlib Barre Matplotlib Istogrammi Matplotlib Grafici a torta Matplotlib

Apprendimento automatico

Iniziare Modalità mediana media Deviazione standard percentile Distribuzione dei dati Distribuzione normale dei dati Trama a dispersione Regressione lineare Regressione polinomiale Regressione multipla Scala Treno/prova Albero decisionale

Python MySQL

MySQL per iniziare MySQL crea database MySQL Crea tabella Inserimento MySQL MySQL Seleziona MySQL dove MySQL Ordina per Elimina MySQL MySQL Drop Table Aggiornamento MySQL Limite MySQL Unisciti a MySQL

Python MongoDB

MongoDB Inizia MongoDB Crea database MongoDB Crea raccolta Inserisci MongoDB MongoDB Trova Interrogazione MongoDB Ordinamento MongoDB Elimina MongoDB Collezione Drop MongoDB Aggiornamento MongoDB Limite MongoDB

Riferimento Python

Panoramica di Python Funzioni integrate in Python Metodi di stringa Python Metodi dell'elenco Python Metodi del dizionario Python Metodi della tupla Python Metodi di impostazione Python Metodi di file Python Parole chiave Python Eccezioni Python Glossario Python

Riferimento del modulo

Modulo casuale Modulo Richieste Modulo Statistiche Modulo di matematica Modulo cMath

Python come fare per

Rimuovi i duplicati dell'elenco Invertire una stringa Aggiungi due numeri

Esempi Python

Esempi Python Compilatore Python Esercizi di Python Python Quiz Certificato Python

Modulo casuale Python


Python ha un modulo integrato che puoi usare per creare numeri casuali.

Il randommodulo ha una serie di metodi:

Method Description
seed() Initialize the random number generator
getstate() Returns the current internal state of the random number generator
setstate() Restores the internal state of the random number generator
getrandbits() Returns a number representing the random bits
randrange() Returns a random number between the given range
randint() Returns a random number between the given range
choice() Returns a random element from the given sequence
choices() Returns a list with a random selection from the given sequence
shuffle() Takes a sequence and returns the sequence in a random order
sample() Returns a given sample of a sequence
random() Returns a random float number between 0 and 1
uniform() Returns a random float number between two given parameters
triangular() Returns a random float number between two given parameters, you can also set a mode parameter to specify the midpoint between the two other parameters
betavariate() Returns a random float number between 0 and 1 based on the Beta distribution (used in statistics)
expovariate() Returns a random float number based on the Exponential distribution (used in statistics)
gammavariate() Returns a random float number based on the Gamma distribution (used in statistics)
gauss() Returns a random float number based on the Gaussian distribution (used in probability theories)
lognormvariate() Returns a random float number based on a log-normal distribution (used in probability theories)
normalvariate() Returns a random float number based on the normal distribution (used in probability theories)
vonmisesvariate() Returns a random float number based on the von Mises distribution (used in directional statistics)
paretovariate() Returns a random float number based on the Pareto distribution (used in probability theories)
weibullvariate() Returns a random float number based on the Weibull distribution (used in statistics)