- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IAReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Struct, enum e trait
Modella i dati con struct ed enum, usa il pattern matching, gestisci Option e Result e condividi il comportamento con trait e generici.
- Lezione 1 sfida Structs Group related values into your own type with named fields.
- Lezione 2 sfide Methods and impl Blocks Attach functions to a struct with impl, including constructors.
- Lezione 1 sfida Enums Define a type that is one of several variants, each with its own data.
- Lezione 2 sfide Pattern Matching with match Compare a value against patterns with match, guards and if let.
- Lezione 1 sfida Temperature Converter Convert between Celsius and Fahrenheit with an enum.
- Lezione 2 sfide Option: Values That May Be Missing Represent a missing value with Option instead of null.
- Lezione 2 sfide Error Handling with Result Return errors as values with Result and pass them on with the ? operator.
- Lezione 1 sfida Bank Account with Result Model deposits and withdrawals that can fail with your own error type.
- Lezione 1 sfida Traits Describe shared behavior with a trait and implement it for different types.
- Lezione 1 sfida Generics Write one function or struct that works with many types.