Skip to content

Commit 65834fc

Browse files
committed
Improve quizes
1 parent f5a4965 commit 65834fc

File tree

4 files changed

+4
-17
lines changed

4 files changed

+4
-17
lines changed

exercises/quizzes/quiz1.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
// - An apple costs 2 rustbucks.
88
// - However, if Mary buys more than 40 apples, the price of each apple in the
99
// entire order is reduced to only 1 rustbuck!
10+
1011
// TODO: Write a function that calculates the price of an order of apples given
1112
// the quantity bought.
12-
13-
// Put your function here!
14-
// fn calculate_price_of_apples(???) -> ??? {
13+
// fn calculate_price_of_apples(???) -> ??? { ??? }
1514

1615
fn main() {
1716
// You can optionally experiment here.

solutions/quizzes/quiz1.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Mary is buying apples. The price of an apple is calculated as follows:
22
// - An apple costs 2 rustbucks.
3-
// - If Mary buys more than 40 apples, each apple only costs 1 rustbuck!
4-
// Write a function that calculates the price of an order of apples given the
5-
// quantity bought.
3+
// - However, if Mary buys more than 40 apples, the price of each apple in the
4+
// entire order is reduced to only 1 rustbuck!
65

76
fn calculate_price_of_apples(n_apples: u64) -> u64 {
87
if n_apples > 40 {

solutions/quizzes/quiz2.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// This is a quiz for the following sections:
2-
// - Strings
3-
// - Vecs
4-
// - Move semantics
5-
// - Modules
6-
// - Enums
7-
//
81
// Let's build a little machine in the form of a function. As input, we're going
92
// to give a list of strings and commands. These commands determine what action
103
// is going to be applied to the string. It can either be:

solutions/quizzes/quiz3.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// This quiz tests:
2-
// - Generics
3-
// - Traits
4-
//
51
// An imaginary magical school has a new report card generation system written
62
// in Rust! Currently, the system only supports creating report cards where the
73
// student's grade is represented numerically (e.g. 1.0 -> 5.5). However, the

0 commit comments

Comments
 (0)