Compiled from: https://hackmd.io/@kuzmapetrovich/S1x90jWGP
-
Create a program that asks the user to enter their name and their age.
Print out a message that tells how many years they have to be 100 years old.
👉 Reference -
Ask the user for a number.
Depending on whether the number is even or odd, print out an appropriate message to the user.
👉 Reference -
Take a list, for example this one:
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
and write a program that prints out all the elements of the list that are less than 5.
👉 Reference -
Create a program that asks the user for a number and then prints out a list of all the divisors of that number.
👉 Reference -
Take two lists, for example:
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
and write a program that returns a list that contains only the elements that are common between the lists (without duplicates).
👉 Reference -
Ask the user for a string and print out whether this string is a palindrome or not.
👉 Reference -
Let’s say you are given a list saved in a variable:
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
Write a Dart code that takes this list and makes a new list that has only the even elements of this list in it.
👉 Reference -
Make a two-player Rock–Paper–Scissors game against the computer.
Ask for player input, compare inputs, print results.
👉 Reference -
Generate a random number between 1 and 100.
Ask the user to guess the number, then tell them whether they guessed too low, too high, or exactly right. Keep track of how many guesses the user took.
👉 Reference -
Ask the user for a number and determine whether the number is prime.
Use a Dart function to make the check.
👉 Reference -
Write a program that takes a list of numbers and makes a new list of only the first and last elements.
For example, if the list is[5, 10, 15, 20, 25], the output should be[5, 25].
👉 Reference -
Write a Dart function that prints out the Fibonacci sequence up to n terms.
Ask the user how many Fibonacci numbers to generate.
👉 Reference -
Write a function that takes a list and returns a new list with only unique elements.
Do not use the built-inSetfeature.
👉 Reference -
Ask the user for a sentence.
Print out the sentence with the words in reverse order.
👉 Reference -
Write a password generator.
Ask the user how strong the password should be (weak, medium, strong). Generate a random password accordingly.
👉 Reference -
Cows and Bulls Game
Generate a 4-digit random number. For each guess, return the number of cows (correct digits in the right place) and bulls (correct digits but in the wrong place).
👉 Reference -
Ask the user for the size of a game board (e.g., 3), and print a square game board of that size.
👉 Reference -
Write a Dart function that checks if someone has won a Tic-Tac-Toe game.
The board is a list of lists. Check for wins via rows, columns, and diagonals.
👉 Reference -
Draw the Tic-Tac-Toe game board and allow players to pick a position and place their symbol (X or O).
👉 Reference -
Build a complete two-player Tic-Tac-Toe game.
Combine board drawing, player input, and win condition checking.
👉 Reference -
Write a program where the computer guesses a number you’re thinking of between 0 and 100.
The user tells the computer if the guess was too high, too low, or correct. Report how many guesses it took.
👉 Reference -
Write a Dart function that takes three numbers and returns the largest.
Do not use built-inmax()functions.
👉 Reference -
Pick a random word from the SOWPODS dictionary.
The word list can be read from a file.
👉 Reference -
Create a single-player Hangman game.
Ask the user to guess letters, display progress, and keep guessing until the word is complete.
👉 Reference -
Extend the Hangman game.
Limit the user to 6 wrong guesses, track used letters, and ask if they want to play again. Optionally add ASCII art.
👉 Reference -
Create a birthday dictionary.
Store names and birthdays. Ask for a name and return the birthday.
👉 Reference -
Allow the user to add new birthdays to the dictionary and save to a JSON file.
👉 Reference -
From the birthday data, count how many birthdays are in each month.
Display results in a readable format.
👉 Reference
🟡 Tip: Work through each problem incrementally. Start with simple prints and inputs, then build up to logic and functions.
📦 Happy Dart coding!