- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AINeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
Structs and interfaces
Structs, methods, pointers, interfaces, embedding, errors and generics.
- Lesson 1 challenge Structs Group related values into your own type with named fields.
- Lesson 2 challenges Methods and Receivers Attach functions to a type and choose between value and pointer receivers.
- Lesson 2 challenges Pointers Use & and * to share a value instead of copying it.
- Lesson 2 challenges Interfaces Describe behavior with an interface that any type can satisfy.
- Lesson 2 challenges Struct Embedding and Composition Reuse fields and methods by embedding one struct in another.
- Lesson 1 challenge Temperature Converter Convert between Celsius and Fahrenheit with your own number types.
- Lesson 2 challenges Error Handling Return errors as values, wrap them with context and check them with errors.Is and errors.As.
- Lesson 1 challenge Bank Account with Errors Model deposits and withdrawals that can fail with your own error types.
- Lesson 1 challenge Generics Write one function or type that works with many types using type parameters.