kpeluso / learning-projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small projects to learn Rust

List from http://www.cplusplus.com/forum/beginner/3473/

To run project from repo root: sh r.sh p1

If external crates are required, run: sh r2.sh p6

Beginner

  1. Write a program which finds the factorial of a number entered by the user. (check for all conditions).
  2. Develop a program to convert currency X to currency Y and vice versa.
  3. Write a program that prints out a triangle from largest to smallest; user inputs the largest number. Eg:
***
**
*
  1. Write a program that prints out a triangle from smallest to largest; user inputs bottom number. Eg:
*
**
***
  1. Print out a triangle from smallest to largest, skipping even rows. User inputs largest number, eg:
*
***
*****
  1. Develop a program that uses a randomly generated number to select 1 of 3 (or more) functions to show the user.
  2. Guessing game. ask the user to guess a number between 1 and a 100. If you guessed correctly, it will say you win. If you're too high or too low it will also let you know.
  3. Create a program which generates Fibonacci series til a number 'n', where 'n' is entered by the user. Eg if the user enters 10 then the output would be: 1 1 2 3 5 8
  4. Given a string, determine how many of the characters are vowels and how many are consonants. Terminate the string when the input character encountered is non-alphabetic.
  5. Find the Fifth root of the sum of the squares of the first 100 ODD numbers only.
  6. Write a program to simulate a simple calculator. It should accept two numbers from the user along with the required operation to be performed. Addition, subtraction, division and multiplication are the basic operations that should be implemented. Feel free to implement other operations. Bonus points for splitting the calculation functions into a separate module.

Intermediate

  1. Simple file encryption (using something simple like ROT13).
  2. Read XHTML, remove the tags, then print out the remaining text.
  3. Write a program which performs addition, subtraction, multiplication of matrices. The dimensions of both the matrices would be specified by the user (dynamic memory allocation required). Use of structure or a class to define the matrix would be a good idea.
  4. Create a sophisticated linked list class. You should be able to insert and delete nodes anywhere in the list, and the nodes should have pointers to nodes both in front and behind them.
  5. Create a command-line todo list with Clap. Users should be able to add, complete and delete items. Bonus: use a database (eg SQLite) to persist todo items between program runs.

Expert

  1. Make a Markov chain generator. Read text from a source, create a histogram and allow different prefix lengths. See Think Python for info.
  2. Create a binary tree which has search and sorting functions.
  3. Create a Quine, (a program that prints out its own source code).

My Rust resources:

Recommended resources for Rust:

About

License:MIT License


Languages

Language:Rust 99.5%Language:Shell 0.5%