Sign up
Log in
Home
Language tracks
Dart track
Exercises
Exercises on the Dart track
Join the Dart Track
35 exercises to help you master Dart
easy
Hello World
The classical introductory exercise. Just say "Hello, World!"
control flow conditionals
optional values
strings
text formatting
easy
Resistor Color
Convert a resistor band's color to its numeric representation
arrays
strings
easy
Two Fer
Create a sentence of the form "One for X, one for me."
conditionals
optional values
text formatting
easy
Resistor Color Duo
Convert color codes, as used on resistors, to a numeric value.
arrays
strings
easy
Reverse String
Reverse a string
strings
easy
Leap
Given a year, report if it is a leap year.
booleans
integers
logic
easy
Scrabble Score
Given a word, compute the scrabble score for that word.
control flow conditionals
control flow loops
equality
strings
easy
Armstrong Numbers
Determine if a number is an Armstrong number
equality
integers
logic
strings
math
easy
Isogram
Determine if a word or phrase is an isogram.
algorithms
logic
strings
easy
Difference Of Squares
Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
integers
math
easy
Word Count
Given a phrase, count the occurrences of each word in that phrase.
control flow loops
lists
maps
regular expressions
easy
Bob
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
control flow conditionals
pattern recognition
polymorphism
regular expressions
strings
unicode
easy
Space Age
Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
floating point numbers
integers
math
polymorphism
easy
Hamming
Calculate the Hamming difference between two DNA strands.
control flow conditionals
control flow loops
equality
strings
easy
Acronym
Convert a long phrase to its acronym
control flow conditionals
control flow loops
equality
regular expressions
strings
easy
Phone Number
Clean up user-entered phone numbers so that they can be sent SMS messages.
control flow conditionals
control flow loops
regular expressions
easy
Gigasecond
Given a moment, determine the moment that would be after a gigasecond has passed.
time
easy
Raindrops
Convert a number to a string, the contents of which depend on the number's factors.
control flow conditionals
equality
strings
easy
RNA Transcription
Given a DNA strand, return its RNA Complement Transcription.
strings
transforming
easy
Anagram
Given a word and a list of possible anagrams, select the correct sublist.
control flow conditionals
control flow loops
equality
strings
easy
Prime Factors
Compute the prime factors of a given natural number.
arrays
conditionals
integers
lists
loops
math
easy
Diamond
Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.
control flow conditionals
control flow loops
strings
easy
Matching Brackets
Make sure the brackets and braces all match.
pattern matching
stacks
easy
Pascal's Triangle
Compute Pascal's triangle up to a given number of rows.
control flow conditionals
control flow loops
integers
lists
math
easy
Darts
Write a function that returns the earned points in a single toss of a Darts game
control flow conditionals
math
easy
Pangram
Determine if a sentence is a pangram.
pattern matching
regular expressions
sets
strings
medium
Luhn
Given a number determine whether or not it is valid per the Luhn formula.
algorithms
booleans
loops
strings
type conversion
medium
Minesweeper
Add the numbers to a minesweeper board
classes
games
lists
logic
loops
math
object oriented programming
medium
ISBN Verifier
Check if a given string is a valid ISBN-10 number.
integers
loops
strings
easy
Collatz Conjecture
Calculate the number of steps to reach 1 using the Collatz conjecture
exception handling
loops
math
medium
Binary Search Tree
Insert and search for numbers in a binary tree.
algorithms
classes
generics
inheritance
logic
object oriented programming
searching
sorting
trees
easy
Nth Prime
Given a number n, determine what the nth prime is.
algorithms
integers
math
easy
Allergies
Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
arrays
bitwise operations
control flow conditionals
control flow loops
easy
Triangle
Determine if a triangle is equilateral, isosceles, or scalene.
control flow conditionals
control flow loops
medium
Secret Handshake
Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
arrays
bitwise operations
integers