Percorso di apprendimento

Pratica con Rust

Dieci esercizi brevi: FizzBuzz, Fibonacci, numeri primi, stringhe, ricerca binaria e un conto bancario.

10 lezioni · 16 sfide

  1. Lezione 1 sfida FizzBuzz Solve the classic FizzBuzz problem with match on a tuple.
  2. Lezione 2 sfide Fibonacci Sequence Generate Fibonacci numbers with a loop and a vector.
  3. Lezione 2 sfide Prime Numbers Check whether a number is prime and list the primes up to 30.
  4. Lezione 1 sfida Reverse a String Reverse the characters of a string and the words of a sentence.
  5. Lezione 2 sfide Palindrome Check Test whether text reads the same forwards and backwards.
  6. Lezione 2 sfide Word Frequency Counter Count how often each word appears with a HashMap.
  7. Lezione 1 sfida Temperature Converter Convert between Celsius and Fahrenheit with an enum.
  8. Lezione 2 sfide Binary Search Find a value in a sorted slice by halving the search range.
  9. Lezione 1 sfida Bank Account with Result Model deposits and withdrawals that can fail with your own error type.
  10. Lezione 2 sfide Sort Structs: Student Ranking Sort a vector of structs by score and name, then compute the average.