Homework: 1. Implement and run the guessing example. $ cat 0101-guessing-game/src/[1]main.rs use rand::Rng; use std::cmp::Ordering; fn main() { let secret_number :u32 = rand::thread_rng().gen_range(1..=100); let mut guess = String::new(); loop { println!("Guess a number: "); guess.clear(); std::io::stdin().read_line(&mut guess).expect("error reading line"); let guess : u32 = match guess.trim().parse() { Ok(num) => num, Err(err) => { println!("{}", err); continue } }; match secret_number.cmp(&guess) { Ordering::Less => println!("Try lower."), Ordering::Greater => println!("Try higher."), Ordering::Equal => { println!("That's it: {}", secret_number); break; } } } } 2. Make a rust project that uses std::io to generate a .jl julia script that performs and outputs the result of an arithmetic calculation. file output: [2]https://doc.rust-lang.org/stable/std/io/ I ended up using [3]https://docs.rust-lang.org/stable/std/fs/ julia: see other thread with similar name $ cat 0102-output-julia/src/[4]main.rs use std::io::Write; fn main() { let mut f : std::fs::File = std::fs::File::create("output.jl").expect("failed to create output.jl"); f.write_all(b"x = 4\nprintln(\"4 + 4 = $(x + 4)\")\n").expect("failed to write lines"); } $ julia output.jl 4 + 4 = 8 References 1. http://main.rs/ 2. https://doc.rust-lang.org/stable/std/io/ 3. https://docs.rust-lang.org/stable/std/fs/ 4. http://main.rs/