From the course: Rust Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Challenge: Higher or lower

Challenge: Higher or lower - Rust Tutorial

From the course: Rust Essential Training

Start my 1-month free trial

Challenge: Higher or lower

(upbeat electronic music) - [Instructor] It's time for another challenge. This time to practice working with external crates and user IO. Your goal for this challenge is to write a program to play the classic guessing game higher or lower. The program starts by generating a random number between one and 100, which it keeps hidden. The user then tries to guess that secret number by entering guesses through the command line. Every time the user submits a guess, the program will print a message to let them know if the guess was too high, too low, or correct. That process of submitting a guess and receiving feedback should repeat as many times as necessary until the user guesses correctly. I'm not providing you with a starting point for this challenge in the exercise files. So you'll need to create a new project for your solution. This challenge will bring together a lot of what we've covered so far in this course. So…

Contents