Master Move programming with interactive exercises
Fill in the blanks to create a generic function that works with any type.
Fill in the blanks to use mutable references to modify values in place.
Fill in the blanks to create a vector and add elements to it.
Fill in the blanks to define a struct and create an instance of it.
Fill in the blanks to create a loop that skips odd numbers and stops at a target.
Fill in the blanks to correctly declare and use address types.
Fill in the blanks to correctly declare variables with different types.
Fill in the blanks to create a function that adds two numbers.
Complete the struct definition by filling in: (1) the visibility keyword, (2) the keyword before abilities, and (3) the field name for storing the coin amount.
Complete the vector manipulation functions.
Create a generic container struct that can hold any type.
Complete the code to work with optional values.
This function should be callable from other modules but has a visibility bug.
This struct needs proper abilities to work with storage.
The function parameters have incorrect reference types.
This code has a potential out-of-bounds error.
The function has a type mismatch error.
Understanding which type constraints are required for generic operations.
Understanding which borrowing patterns are allowed in Move.
Understanding what happens when accessing vector elements.
Understanding which abilities should be used for different types of structs.
Understanding how if expressions return values in Move.
Understanding what happens when integers exceed their maximum values.
Test your understanding of Move modules.
Test your knowledge of integer type ranges in Move.
Which abilities does a struct need for different operations?
Understanding when to use mutable vs immutable references.
How do if expressions work in Move?
Understanding constraints on generic types.
Predict how Move infers types for generic functions.
Predict the final value after multiple borrow and modify operations.
Predict the vector length after push and pop operations.
Predict the output after accessing and modifying struct fields.
Predict what happens when an assert condition fails.
Predict the output after type casting operations.
Predict what value this function returns.
Predict the output of this arithmetic operation.
What will this if expression return?
Predict the length of this vector after operations.
Predict the final value after reference operations.
What does this function return?