summaryrefslogtreecommitdiff
path: root/solutions/quizzes
diff options
context:
space:
mode:
Diffstat (limited to 'solutions/quizzes')
-rw-r--r--solutions/quizzes/quiz1.rs5
-rw-r--r--solutions/quizzes/quiz2.rs7
-rw-r--r--solutions/quizzes/quiz3.rs4
3 files changed, 2 insertions, 14 deletions
diff --git a/solutions/quizzes/quiz1.rs b/solutions/quizzes/quiz1.rs
index bc76166..5503c8c 100644
--- a/solutions/quizzes/quiz1.rs
+++ b/solutions/quizzes/quiz1.rs
@@ -1,8 +1,7 @@
// Mary is buying apples. The price of an apple is calculated as follows:
// - An apple costs 2 rustbucks.
-// - If Mary buys more than 40 apples, each apple only costs 1 rustbuck!
-// Write a function that calculates the price of an order of apples given the
-// quantity bought.
+// - However, if Mary buys more than 40 apples, the price of each apple in the
+// entire order is reduced to only 1 rustbuck!
fn calculate_price_of_apples(n_apples: u64) -> u64 {
if n_apples > 40 {
diff --git a/solutions/quizzes/quiz2.rs b/solutions/quizzes/quiz2.rs
index 0d2a513..2f5cc05 100644
--- a/solutions/quizzes/quiz2.rs
+++ b/solutions/quizzes/quiz2.rs
@@ -1,10 +1,3 @@
-// This is a quiz for the following sections:
-// - Strings
-// - Vecs
-// - Move semantics
-// - Modules
-// - Enums
-//
// Let's build a little machine in the form of a function. As input, we're going
// to give a list of strings and commands. These commands determine what action
// is going to be applied to the string. It can either be:
diff --git a/solutions/quizzes/quiz3.rs b/solutions/quizzes/quiz3.rs
index e3413fd..7b91278 100644
--- a/solutions/quizzes/quiz3.rs
+++ b/solutions/quizzes/quiz3.rs
@@ -1,7 +1,3 @@
-// This quiz tests:
-// - Generics
-// - Traits
-//
// An imaginary magical school has a new report card generation system written
// in Rust! Currently, the system only supports creating report cards where the
// student's grade is represented numerically (e.g. 1.0 -> 5.5). However, the