From 36fe7cf4a7db0d25abd8213a4a58473faf23b6d8 Mon Sep 17 00:00:00 2001 From: Zev Averbach Date: Mon, 20 Dec 2021 15:50:03 +0100 Subject: [PATCH] first --- README.md | 21 +++++++++++++++++++++ ch1.1.md | 4 ++++ ch1.2.md | 1 + ch1.md | 5 +++++ ch2.md | 6 ++++++ ch3.md | 4 ++++ 6 files changed, 41 insertions(+) create mode 100644 README.md create mode 100644 ch1.1.md create mode 100644 ch1.2.md create mode 100644 ch1.md create mode 100644 ch2.md create mode 100644 ch3.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..54ae913 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# How to use this repo + +Go through the markdown files in order, building the things described in them. + +Once you've successfully built a thing and made it run, _delete_ it and build something else! In this way you'll build muscle memory with the language. + +# Where's the content from? + +So far it's all either from these three sources, + +- [The Rust Book](https://doc.rust-lang.org/book/) +- [Hands-On Rust](https://pragprog.com/titles/hwrust/hands-on-rust/) +- [Programming Rust](https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/) + +or something I've made up. + +# Organizational Note + +The chapter numbers on the markdown files are somewhat approximate. The "fractional" chapter numbers are meant to indicate that the material is somewhere between the Rust Book chapters and may not at all emanate from that book. + +I should probably just put these on Exercism and delete the repo, but :man_shrugging: diff --git a/ch1.1.md b/ch1.1.md new file mode 100644 index 0000000..70811ab --- /dev/null +++ b/ch1.1.md @@ -0,0 +1,4 @@ +write a function that prompts the user for their name and says hello +write a function that prompts a user for a number, add 2 to it, then print the sum +write a function that compares a number input by the user to 10 +write a function that generates a random number diff --git a/ch1.2.md b/ch1.2.md new file mode 100644 index 0000000..52275b6 --- /dev/null +++ b/ch1.2.md @@ -0,0 +1 @@ +Use `env` to collect arguments from the caller of a CLI, maybe for determining which numbers are odd. diff --git a/ch1.md b/ch1.md new file mode 100644 index 0000000..a283a60 --- /dev/null +++ b/ch1.md @@ -0,0 +1,5 @@ +- [ ] make a project "hello" +- [ ] create a source file to print "hello world" +- [ ] check your code +- [ ] build your code +- [ ] run your code diff --git a/ch2.md b/ch2.md new file mode 100644 index 0000000..a8204c0 --- /dev/null +++ b/ch2.md @@ -0,0 +1,6 @@ + +Implement a classic beginner programming problem: a guessing game. +- [ ] generate a random integer between 1 and 100 +- [ ] prompt the player to enter a guess +- [ ] after a guess is entered, indicate whether the guess is too low or too high +- [ ] elseif the guess is correct, print a congratulatory message and exit diff --git a/ch3.md b/ch3.md new file mode 100644 index 0000000..0f9b359 --- /dev/null +++ b/ch3.md @@ -0,0 +1,4 @@ +Assign the result of a loop to a var. +Convert temperatures between Fahrenheit and Celsius. +Generate the nth Fibonacci number. +Print the lyrics to the Christmas carol “The Twelve Days of Christmas,” taking advantage of the repetition in the song.