Here's a big list of projects I've been working through to learn Rust, starting at smaller, simpler projects and working up to larger, more involved projects. Some of them are fairly arbitrary (like printing out triangles), while some are a lot more practical (Youtube downloader, Markov chain generator).
Beginner
- Write a programme which finds the factorial of a number entered by the user. (check for all conditions).
- Develop a programme to convert currency X to currency Y and vice versa.
- Write a programme that prins out a triangle from largest to smallest; user inputs the largest number. Eg:
*****
****
***
**
*
- Write a programme that prints out a triangle from smallest to largest; user inputs bottom number. Eg:
- Print out a triangle from smallest to largest, skipping even rows. User inputs largest number, eg:
*
***
*****
*******
- Develop a programme that uses a randomly generated number to select 1 of 3 (or more) functions to show the user.
- 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.
- Create a programme 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
- 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.
- Find the Fifth root of the sum of the squares of the first 100 ODD numbers only.
- List all possible combinations of letters in a 4-letter word. Eg 'TEST' can be unscrambled as TEST, TETS, TSET, TSTE, TTSE, TTES, etc.
- Make a programme that allows the user to input either the radius, diameter, or area of the circle. The programme should then calculate the other 2 based on the input.
- Read a line of text and write it out backwards using a recursive function.
- Write a programme 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.
- Determine how much money is in a piggy bank that contains several £2 coins, £1 coins, 50p coins, 20p coins, 10p coins and 5p coins. Use the following values to test your programme: one £2, three £1, five 50p coins, two 20p coins, one 10p coin and fifteen 5p coins.
- Create a simple palindrome checker programme. The programme should allow the user to enter a string and check whether the given string is a palindrome or not. Only digits and alphabets should be considered while checking for palindromes - any other characters are to be ignored.
- Write a programme that allows you to input students' midterm, final and homework scores, and calculate a weighted score. Use the following weights: 20% midterm, 40% final, 40% median homework.
Intermediate
- Simple file encryption using ROT13. Optional: allow a choice of encryption eg Caeser cipher.
- Write a programme which will print all the pairs of prime numbers whose sum equals the number entered by the user. Eg 10 = 5 + 5, 7 + 3; 12 = 11 + 1, 5 + 7
- Write a quiz which retrieves a question and answer from a file. Allow the user to take the quiz, count points total and show score.
- Read XHTML, remove the tags, then print out the remaining text.
- Write a programme 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.
- Write a programme which will perform the job of moving the file from one location to another. The source and destination path will be entered by the user. Perform the required error checking and handle the exceptions accordingly.
- 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.
- Create a programme that implements a database. The fields are hard-coded, and the data is saved in a binary file. Although this isn't really flexibility, you aren't relying on any external libraries or functions.
- Create a command-line todo list. Users should be able to add, complete and delete items. Bonus: use a database (eg SQLite) to persist todo items between programme runs.
Expert
- Write a programme which acted like a personal planner. A user can input an event, note things to-do on a certain date.
- Make a Markov chain generator. Read text from a source, create a histogram and allow different prefix lengths. See Think Python for more details.
- Noughts and crosses game.
- Write a phone/address book programme, with persistent data. The users should be able to add/delete/change the data.
- Write a simple payroll programme, that would include pay rates, and hours work for employees.
- Write a card game, eg blackjack
- Create a chess game.
- Create a binary tree which has search and sorting functions.
- Create a quine, (a programme that prints out its own source code).
- Create a Youtube video downloader
- Make a pokedex - use a database, enums for types/gender etc
- Site uptime checker - check a website periodically, and email or alert the user if it is down
- Batch thumbnail processor - select a group of images and generate thumbnails for them all. Use threads.
- PDF creator - convert a file (html, text etc) to a PDF, or combine several PDFs into one.
Graphics
- Write a programme to draw a rectangle, ellipse, square, circle, point and line based on user input.
- Create a paint programme. It should be possible to switch between different tools (circle, rectangle, eraser etc) using pre-defined key strokes.
- Plot a simple x-y graph for a hardcoded function (e.g. y=cos(x)). It should be possible to zoom in on any part of the graph.
- Write a programme to plot a graph of given equation of form y=f(x) and a range for x as command line arguments. (e.g. mygraphplotter -eq="y=x*x" -xmin=-10, -xmax=10) (PS: more to do with equation solving than graphics)
- Write the classic brick break-out game (Arkanoid/Breakout)
- Watermark programme - add a watermark to an image
Web
- Make a website which has Home and About pages; these can be static HTML.
- Make a server which will say hello to the visitor. Should be able to send a name to the server, via POST or GET, and get a JSON response (eg { "response": "Hello Bob!" })
- Create a site which allows users to sign up and log in.
- Page scraper - connect to a site and save all images or files or links on the page.
Good resources for Rust:
- Awesome Rust list
- Rust for Node developers
- Are we web yet?
- Learning Rust With Entirely Too Many Linked Lists
- Rocket.rs web framework
- https://github.com/ctjhoa/rust-learning
- https://github.com/cis198-2016s