Practice Exercises

Master Move programming with interactive exercises

0
Completed
0
Mastered
0
Total XP
0%
Avg Score

Filters

Showing 41 of 41 exercises

Generic Function with Type Parameters

Fill in the blanks to create a generic function that works with any type.

intermediategenerics5 min
60 XP

Using Mutable References Correctly

Fill in the blanks to use mutable references to modify values in place.

intermediatereferences4 min
50 XP

Creating and Adding to Vectors

Fill in the blanks to create a vector and add elements to it.

beginnervectors4 min
45 XP

Define and Create a Struct

Fill in the blanks to define a struct and create an instance of it.

beginnerstructs4 min
45 XP

Loop with Break and Continue

Fill in the blanks to create a loop that skips odd numbers and stops at a target.

beginnercontrol flow4 min
45 XP

Working with Addresses

Fill in the blanks to correctly declare and use address types.

beginnerprimitives3 min
40 XP

Declare Variables

Fill in the blanks to correctly declare variables with different types.

beginnerprimitives3 min
40 XP

Complete the Add Function

Fill in the blanks to create a function that adds two numbers.

beginnerfunctions3 min
50 XP

Define a Coin Struct

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.

intermediatestructs5 min
75 XP

Vector Operations

Complete the vector manipulation functions.

intermediatevectors4 min
70 XP

Generic Container

Create a generic container struct that can hold any type.

advancedgenerics6 min
100 XP

Working with Option Types

Complete the code to work with optional values.

beginneroptions4 min
60 XP

Fix the Function Visibility

This function should be callable from other modules but has a visibility bug.

beginnerfunctions3 min
50 XP

Fix the Struct Abilities

This struct needs proper abilities to work with storage.

intermediatestructs5 min
75 XP

Fix the Reference Types

The function parameters have incorrect reference types.

intermediatereferences4 min
70 XP

Fix Vector Out of Bounds

This code has a potential out-of-bounds error.

advancedvectors6 min
90 XP

Fix Type Mismatch

The function has a type mismatch error.

beginnerprimitives3 min
55 XP

Type Constraints and Abilities

Understanding which type constraints are required for generic operations.

intermediategenerics4 min
55 XP

Valid Borrow Scenarios

Understanding which borrowing patterns are allowed in Move.

intermediatereferences4 min
50 XP

Vector Safety and Bounds Checking

Understanding what happens when accessing vector elements.

beginnervectors3 min
40 XP

Choosing Abilities for Digital Assets

Understanding which abilities should be used for different types of structs.

beginnerstructs3 min
40 XP

If Expression Rules

Understanding how if expressions return values in Move.

beginnercontrol flow3 min
35 XP

Integer Overflow

Understanding what happens when integers exceed their maximum values.

beginnerprimitives3 min
35 XP

Module Basics

Test your understanding of Move modules.

beginnermodules2 min
30 XP

Integer Types Range

Test your knowledge of integer type ranges in Move.

beginnerprimitives2 min
40 XP

Understanding Abilities

Which abilities does a struct need for different operations?

intermediateabilities4 min
60 XP

Reference Types

Understanding when to use mutable vs immutable references.

intermediatereferences3 min
55 XP

If Expressions

How do if expressions work in Move?

beginnercontrol flow3 min
45 XP

Generic Type Constraints

Understanding constraints on generic types.

advancedgenerics5 min
80 XP

Generic Type Inference

Predict how Move infers types for generic functions.

intermediategenerics4 min
55 XP

Complex Borrow and Modify

Predict the final value after multiple borrow and modify operations.

intermediatereferences4 min
55 XP

Vector Length After Operations

Predict the vector length after push and pop operations.

beginnervectors3 min
40 XP

Struct Field Access

Predict the output after accessing and modifying struct fields.

beginnerstructs3 min
40 XP

Assert Behavior

Predict what happens when an assert condition fails.

beginnercontrol flow3 min
40 XP

Type Casting Result

Predict the output after type casting operations.

beginnerprimitives3 min
40 XP

Function Call Result

Predict what value this function returns.

beginnerfunctions2 min
35 XP

Simple Arithmetic

Predict the output of this arithmetic operation.

beginnerprimitives2 min
40 XP

If Expression Result

What will this if expression return?

intermediatecontrol flow3 min
55 XP

Vector Length

Predict the length of this vector after operations.

intermediatevectors4 min
60 XP

Reference Modification

Predict the final value after reference operations.

advancedreferences5 min
75 XP

Function Return Value

What does this function return?

beginnerfunctions2 min
45 XP