Check out example codes for "rust rand 1 101". It will help you in understanding the concepts better.

Code Example 1

use rand::Rng;

fn main() {
    let secret_number = rand::thread_rng().gen_range(1, 101);
    println!("{}", secret_number);
}

Learn ReactJs, React Native from akashmittal.com