From e4ada12aa5800505aeb4d5945fd961d2f2b274a5 Mon Sep 17 00:00:00 2001 From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:40:29 +0200 Subject: [PATCH 1/7] Quiz level 16 q 1-5 --- content/quizzes/en.yaml | 185 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 184 insertions(+), 1 deletion(-) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index 7b73cd7b3f7..c0926bb4e24 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3519,7 +3519,190 @@ levels: correct_answer: "A" hint: "You win the game by having the most points. Your name should appear on the screen" question_score: "10" - + 16: + 1: + question_text: "Which command should be filled in on the blanks to print a random snack?" + code: | + snacks = nachos, chips, cucumber, sweets + {print} _ + mp_choice_options: + - option: "`snacks {at} {random}`" + feedback: "This is the old way." + - option: "`[{random} snack]`" + feedback: "The order is wrong." + - option: "`snacks[{random}]` " + feedback: "Correct" + - option: "`snacks[{at} {random}]`" + feedback: "We do not need `at`anymore" + correct_answer: "C" + hint: "We no longer use {at}" + question_score: "10" + 2: + question_text: "What should be filled in on the blanks if you want a list of what chores are done by whom?" + code: | + friends = ['Wesley', 'Eric', 'Kaylee'] + chores = [the cooking, the cleaning, nothing] + {for} i {in} {range} 1 {to} 3 + {print} _ + mp_choice_options: + - option: "friends[i] has to do chores [i]" + feedback: "Mind the spacing." + - option: "friends[1] has to do chores[1]" + feedback: "It will print 3 times that Wesley has to do the cooking" + - option: "chores[i] has to do friends[random]" + feedback: "The person has to do the chore, not the other way around" + - option: "friends[i] has to do chores[i]" + feedback: "Fantastic!" + correct_answer: "D" + hint: "`i` tells us what item in the list it is. So friend 1 does chore 1 etc." + question_score: "10" + 3: + question_text: "What is a possible output for this program" + code: | + friends = ['Wesley', 'Eric', 'Kaylee'] + chore = [the cooking, the cleaning, nothing] + {for} i {in} {range} 1 {to} 3 + {print} friends[i] has to do chores[i] + mp_choice_options: + - option_code: | + Wesley has to do the cooking + Eric has to do the cleaning + Kaylee has to do nothing + feedback: "Super!" + - option_code: | + Kaylee has to do the cooking + Wesley has to do the cleaning + Eric has to do nothing + feedback: "No, it is not random." + - option_code: | + Wesley has to do the cooking + Wesley has to do the cleaning + Wesley has to do the nothing + feedback: "Poor Wesley!" + - option_code: | + Wesley has to do the cooking + Wesley has to do the cooking + Wesley has to do the cooking + feedback: "That's not it" + correct_answer: "A" + hint: "It's not random..." + question_score: "10" + 4: + question_text: "What is wrong with this code?" + code: | + friends = ['Jaylee', 'Erin', 'Fay'] + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 0 {to} 3 + print 'the lucky number of ' friends[i] + print 'is ' lucky_numbers[i] + mp_choice_options: + - option: "The variable in line 4 should be 'friend[i]', not 'friends[i]'" + feedback: "That is not right." + - option: "Line 3 should say 'in range 1 to 3' not 'in range 0 to 3'" + feedback: "Good catch!" + - option: "Line 4 should say 'lucky_number', not 'lucky number" + feedback: "It's not a variable, it's just text. " + - option: "{in} in line 3 should be removed" + feedback: "That's not it" + correct_answer: "B" + hint: "There's nothing wrong with line 4" + question_score: "10" + 5: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 6: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 7: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 8: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 9: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 10: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" # Empty format for a question to use later # 10: # question_text: From c821e9f8e7a20d59d2dcf04dbdfdfeb7c9576c84 Mon Sep 17 00:00:00 2001 From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:56:40 +0200 Subject: [PATCH 2/7] Update en.yaml --- content/quizzes/en.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index c0926bb4e24..bb315595475 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3671,7 +3671,7 @@ levels: correct_answer: "C" hint: "test" question_score: "10" - 9: + 9: question_text: "test" code: | test From ec15a8148a1cf6796213d4fd3e2bb1f8f5edbfd9 Mon Sep 17 00:00:00 2001 From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:24:06 +0200 Subject: [PATCH 3/7] foutje --- content/quizzes/en.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index bb315595475..1c9a7b32490 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3564,25 +3564,33 @@ levels: {for} i {in} {range} 1 {to} 3 {print} friends[i] has to do chores[i] mp_choice_options: - - option_code: | + - option: | + ``` Wesley has to do the cooking Eric has to do the cleaning Kaylee has to do nothing + ``` feedback: "Super!" - - option_code: | + - option: | + ``` Kaylee has to do the cooking Wesley has to do the cleaning Eric has to do nothing + ``` feedback: "No, it is not random." - - option_code: | + - option: | + ``` Wesley has to do the cooking Wesley has to do the cleaning Wesley has to do the nothing + ``` feedback: "Poor Wesley!" - - option_code: | + - option: | + ``` Wesley has to do the cooking Wesley has to do the cooking Wesley has to do the cooking + ``` feedback: "That's not it" correct_answer: "A" hint: "It's not random..." From 7c2cf83cbcbc75da939fcf1f74f4d44833b3fe57 Mon Sep 17 00:00:00 2001 From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com> Date: Thu, 5 Oct 2023 09:59:46 +0200 Subject: [PATCH 4/7] Update en.yaml --- content/quizzes/en.yaml | 87 +++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index 1c9a7b32490..b821594abdf 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3562,7 +3562,7 @@ levels: friends = ['Wesley', 'Eric', 'Kaylee'] chore = [the cooking, the cleaning, nothing] {for} i {in} {range} 1 {to} 3 - {print} friends[i] has to do chores[i] + {print} friends[i] ' has to do ' chores[i] mp_choice_options: - option: | ``` @@ -3616,57 +3616,68 @@ levels: hint: "There's nothing wrong with line 4" question_score: "10" 5: - question_text: "test" + question_text: "Which line should be filled in in the blank?" code: | - test - mp_choice_options: - - option: "test" - feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" + animals = ['dog', 'cow', 'horse'] + _ + {for} i {in} {range} 1 {to} 3 + {print} 'the ' animals[i] ' says ' sounds[i] + mp_choice_options: + - option: "noises = ['moo', 'woof', 'neigh']" + feedback: "Mind the variable name and the order of the sounds." + - option: "sounds = '[woof], [moo], [neigh]'. " + feedback: "Look at line one to see how brackets are supposed to be used." + - option: "sounds = [woof, moo, neigh]" + feedback: "Don't forget the quotation marks!" + - option: "sounds = ['woof', 'moo', 'neigh']" + feedback: "Great job!" + correct_answer: "D" + hint: "Look at line 1 to see proper use of brackets and quotation marks." question_score: "10" 6: - question_text: "test" + question_text: "Which statement is true?" code: | - test - mp_choice_options: - - option: "test" - feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" + people = ['Chris', 'Jaylino', 'Ryan'] + games = ['fortnite', 'minecraft', 'fifa'] + {for} o {in} {range} 1 {to} 3 + {print} people[o] ' likes ' games[o] + mp_choice_options: + - option: "You are not allowed to use the variable o. It should be named i." + feedback: "i is the most commonly used variable name in this case, but it's not mandatory to use i." + - option: "The output will say that Jaylino likes fortnite." + feedback: "No, he likes minecraft." + - option: "The output will say that Ryan likes fifa" feedback: "Correct" - - option: "test" - feedback: "That's not it" + - option: "This code will not work. It will give and error." + feedback: "No, the code is correct." correct_answer: "C" - hint: "test" + hint: "There is nothing wrong with this code." question_score: "10" 7: - question_text: "test" + question_text: "What's wrong with this code?" code: | - test + people = ['Savi', 'Senna', 'Fayenne'] + transportation = ['bike', 'train', 'car'] + {for} i {in} {range} 1 {to} 3 + {print} people[i] goes to school by transportation[i] mp_choice_options: - - option: "test" + - option: "Line 1 needs less quotation marks" feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" + - option: "Line 3 should start with indentation" + feedback: "It should not!" + - option: "Line 4 should start without indentation" + feedback: "It should not" + - option: "Line 4 needs more quotation marks." + feedback: "Amazing!" + correct_answer: "D" + hint: "There is a mistake made in the usage of quotation marks." question_score: "10" 8: - question_text: "test" + question_text: "What is a possible output for this code?" code: | - test + countries = ['Canada', 'Zimbabwe', 'New Zealand'] + {for} i {in} {range} 0 {to} 1 + {print} 'I will travel to ' countries[random] mp_choice_options: - option: "test" feedback: "That is not right." From 3c9c89c32e07206559f2428eaeb233c4d57f49c5 Mon Sep 17 00:00:00 2001 From: Felienne Hermans Date: Sun, 15 Oct 2023 17:57:48 +0200 Subject: [PATCH 5/7] re add quiz level 16 --- content/quizzes/en.yaml | 184 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index 23f8cd7f43b..580a5b14c03 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3540,3 +3540,187 @@ levels: hint: You win the game by having the most points. Your name should appear on the screen correct_answer: A question_score: '10' + 16: + 1: + question_text: "Which command should be filled in on the blanks to print a random snack?" + code: | + snacks = nachos, chips, cucumber, sweets + {print} _ + mp_choice_options: + - option: "`snacks {at} {random}`" + feedback: "This is the old way." + - option: "`[{random} snack]`" + feedback: "The order is wrong." + - option: "`snacks[{random}]` " + feedback: "Correct" + - option: "`snacks[{at} {random}]`" + feedback: "We do not need `at`anymore" + correct_answer: "C" + hint: "We no longer use {at}" + question_score: "10" + 2: + question_text: "What should be filled in on the blanks if you want a list of what chores are done by whom?" + code: | + friends = ['Wesley', 'Eric', 'Kaylee'] + chores = [the cooking, the cleaning, nothing] + {for} i {in} {range} 1 {to} 3 + {print} _ + mp_choice_options: + - option: "friends[i] has to do chores [i]" + feedback: "Mind the spacing." + - option: "friends[1] has to do chores[1]" + feedback: "It will print 3 times that Wesley has to do the cooking" + - option: "chores[i] has to do friends[random]" + feedback: "The person has to do the chore, not the other way around" + - option: "friends[i] has to do chores[i]" + feedback: "Fantastic!" + correct_answer: "D" + hint: "`i` tells us what item in the list it is. So friend 1 does chore 1 etc." + question_score: "10" + 3: + question_text: "What is a possible output for this program" + code: | + friends = ['Wesley', 'Eric', 'Kaylee'] + chore = [the cooking, the cleaning, nothing] + {for} i {in} {range} 1 {to} 3 + {print} friends[i] has to do chores[i] + mp_choice_options: + - option_code: | + Wesley has to do the cooking + Eric has to do the cleaning + Kaylee has to do nothing + feedback: "Super!" + - option_code: | + Kaylee has to do the cooking + Wesley has to do the cleaning + Eric has to do nothing + feedback: "No, it is not random." + - option_code: | + Wesley has to do the cooking + Wesley has to do the cleaning + Wesley has to do the nothing + feedback: "Poor Wesley!" + - option_code: | + Wesley has to do the cooking + Wesley has to do the cooking + Wesley has to do the cooking + feedback: "That's not it" + correct_answer: "A" + hint: "It's not random..." + question_score: "10" + 4: + question_text: "What is wrong with this code?" + code: | + friends = ['Jaylee', 'Erin', 'Fay'] + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 0 {to} 3 + print 'the lucky number of ' friends[i] + print 'is ' lucky_numbers[i] + mp_choice_options: + - option: "The variable in line 4 should be 'friend[i]', not 'friends[i]'" + feedback: "That is not right." + - option: "Line 3 should say 'in range 1 to 3' not 'in range 0 to 3'" + feedback: "Good catch!" + - option: "Line 4 should say 'lucky_number', not 'lucky number" + feedback: "It's not a variable, it's just text. " + - option: "{in} in line 3 should be removed" + feedback: "That's not it" + correct_answer: "B" + hint: "There's nothing wrong with line 4" + question_score: "10" + 5: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 6: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 7: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 8: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 9: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" + 10: + question_text: "test" + code: | + test + mp_choice_options: + - option: "test" + feedback: "That is not right." + - option: "test" + feedback: "You don't have to keep guessing if you've given the right answer." + - option: "test" + feedback: "Correct" + - option: "test" + feedback: "That's not it" + correct_answer: "C" + hint: "test" + question_score: "10" From 7adc11536ba068fdb105aeef73dd0a028201c36b Mon Sep 17 00:00:00 2001 From: Felienne Hermans Date: Sun, 15 Oct 2023 18:01:16 +0200 Subject: [PATCH 6/7] readd the other changes --- content/quizzes/en.yaml | 134 ++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 82 deletions(-) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index 580a5b14c03..af24d54eeaa 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3585,22 +3585,22 @@ levels: {for} i {in} {range} 1 {to} 3 {print} friends[i] has to do chores[i] mp_choice_options: - - option_code: | + - option: | Wesley has to do the cooking Eric has to do the cleaning Kaylee has to do nothing feedback: "Super!" - - option_code: | + - option: | Kaylee has to do the cooking Wesley has to do the cleaning Eric has to do nothing feedback: "No, it is not random." - - option_code: | + - option: | Wesley has to do the cooking Wesley has to do the cleaning Wesley has to do the nothing feedback: "Poor Wesley!" - - option_code: | + - option: | Wesley has to do the cooking Wesley has to do the cooking Wesley has to do the cooking @@ -3629,98 +3629,68 @@ levels: hint: "There's nothing wrong with line 4" question_score: "10" 5: - question_text: "test" + question_text: "Which line should be filled in in the blank?" code: | - test - mp_choice_options: - - option: "test" - feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" + animals = ['dog', 'cow', 'horse'] + _ + {for} i {in} {range} 1 {to} 3 + {print} 'the ' animals[i] ' says ' sounds[i] + mp_choice_options: + - option: "noises = ['moo', 'woof', 'neigh']" + feedback: "Mind the variable name and the order of the sounds." + - option: "sounds = '[woof], [moo], [neigh]'. " + feedback: "Look at line one to see how brackets are supposed to be used." + - option: "sounds = [woof, moo, neigh]" + feedback: "Don't forget the quotation marks!" + - option: "sounds = ['woof', 'moo', 'neigh']" + feedback: "Great job!" + correct_answer: "D" + hint: "Look at line 1 to see proper use of brackets and quotation marks." question_score: "10" 6: - question_text: "test" + question_text: "Which statement is true?" code: | - test - mp_choice_options: - - option: "test" - feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" + people = ['Chris', 'Jaylino', 'Ryan'] + games = ['fortnite', 'minecraft', 'fifa'] + {for} o {in} {range} 1 {to} 3 + {print} people[o] ' likes ' games[o] + mp_choice_options: + - option: "You are not allowed to use the variable o. It should be named i." + feedback: "i is the most commonly used variable name in this case, but it's not mandatory to use i." + - option: "The output will say that Jaylino likes fortnite." + feedback: "No, he likes minecraft." + - option: "The output will say that Ryan likes fifa" feedback: "Correct" - - option: "test" - feedback: "That's not it" + - option: "This code will not work. It will give and error." + feedback: "No, the code is correct." correct_answer: "C" - hint: "test" + hint: "There is nothing wrong with this code." question_score: "10" 7: - question_text: "test" + question_text: "What's wrong with this code?" code: | - test + people = ['Savi', 'Senna', 'Fayenne'] + transportation = ['bike', 'train', 'car'] + {for} i {in} {range} 1 {to} 3 + {print} people[i] goes to school by transportation[i] mp_choice_options: - - option: "test" + - option: "Line 1 needs less quotation marks" feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" + - option: "Line 3 should start with indentation" + feedback: "It should not!" + - option: "Line 4 should start without indentation" + feedback: "It should not" + - option: "Line 4 needs more quotation marks." + feedback: "Amazing!" + correct_answer: "D" + hint: "There is a mistake made in the usage of quotation marks." question_score: "10" 8: - question_text: "test" + question_text: "What is a possible output for this code?" code: | - test + countries = ['Canada', 'Zimbabwe', 'New Zealand'] + {for} i {in} {range} 0 {to} 1 + {print} 'I will travel to ' countries[random] mp_choice_options: - option: "test" feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" - question_score: "10" - 9: - question_text: "test" - code: | - test - mp_choice_options: - - option: "test" - feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" - question_score: "10" - 10: - question_text: "test" - code: | - test - mp_choice_options: - - option: "test" - feedback: "That is not right." - - option: "test" - feedback: "You don't have to keep guessing if you've given the right answer." - - option: "test" - feedback: "Correct" - - option: "test" - feedback: "That's not it" - correct_answer: "C" - hint: "test" - question_score: "10" From 5bb182c2cf24418a7017e8f48e73b3c6a6faee1b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 15 Oct 2023 16:02:02 +0000 Subject: [PATCH 7/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- content/quizzes/en.yaml | 306 ++++++++++++++++++++-------------------- 1 file changed, 153 insertions(+), 153 deletions(-) diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index af24d54eeaa..af5d96cf509 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3541,156 +3541,156 @@ levels: correct_answer: A question_score: '10' 16: - 1: - question_text: "Which command should be filled in on the blanks to print a random snack?" - code: | - snacks = nachos, chips, cucumber, sweets - {print} _ - mp_choice_options: - - option: "`snacks {at} {random}`" - feedback: "This is the old way." - - option: "`[{random} snack]`" - feedback: "The order is wrong." - - option: "`snacks[{random}]` " - feedback: "Correct" - - option: "`snacks[{at} {random}]`" - feedback: "We do not need `at`anymore" - correct_answer: "C" - hint: "We no longer use {at}" - question_score: "10" - 2: - question_text: "What should be filled in on the blanks if you want a list of what chores are done by whom?" - code: | - friends = ['Wesley', 'Eric', 'Kaylee'] - chores = [the cooking, the cleaning, nothing] - {for} i {in} {range} 1 {to} 3 - {print} _ - mp_choice_options: - - option: "friends[i] has to do chores [i]" - feedback: "Mind the spacing." - - option: "friends[1] has to do chores[1]" - feedback: "It will print 3 times that Wesley has to do the cooking" - - option: "chores[i] has to do friends[random]" - feedback: "The person has to do the chore, not the other way around" - - option: "friends[i] has to do chores[i]" - feedback: "Fantastic!" - correct_answer: "D" - hint: "`i` tells us what item in the list it is. So friend 1 does chore 1 etc." - question_score: "10" - 3: - question_text: "What is a possible output for this program" - code: | - friends = ['Wesley', 'Eric', 'Kaylee'] - chore = [the cooking, the cleaning, nothing] - {for} i {in} {range} 1 {to} 3 - {print} friends[i] has to do chores[i] - mp_choice_options: - - option: | - Wesley has to do the cooking - Eric has to do the cleaning - Kaylee has to do nothing - feedback: "Super!" - - option: | - Kaylee has to do the cooking - Wesley has to do the cleaning - Eric has to do nothing - feedback: "No, it is not random." - - option: | - Wesley has to do the cooking - Wesley has to do the cleaning - Wesley has to do the nothing - feedback: "Poor Wesley!" - - option: | - Wesley has to do the cooking - Wesley has to do the cooking - Wesley has to do the cooking - feedback: "That's not it" - correct_answer: "A" - hint: "It's not random..." - question_score: "10" - 4: - question_text: "What is wrong with this code?" - code: | - friends = ['Jaylee', 'Erin', 'Fay'] - lucky_numbers = [15, 18, 6] - {for} i {in} {range} 0 {to} 3 - print 'the lucky number of ' friends[i] - print 'is ' lucky_numbers[i] - mp_choice_options: - - option: "The variable in line 4 should be 'friend[i]', not 'friends[i]'" - feedback: "That is not right." - - option: "Line 3 should say 'in range 1 to 3' not 'in range 0 to 3'" - feedback: "Good catch!" - - option: "Line 4 should say 'lucky_number', not 'lucky number" - feedback: "It's not a variable, it's just text. " - - option: "{in} in line 3 should be removed" - feedback: "That's not it" - correct_answer: "B" - hint: "There's nothing wrong with line 4" - question_score: "10" - 5: - question_text: "Which line should be filled in in the blank?" - code: | - animals = ['dog', 'cow', 'horse'] - _ - {for} i {in} {range} 1 {to} 3 - {print} 'the ' animals[i] ' says ' sounds[i] - mp_choice_options: - - option: "noises = ['moo', 'woof', 'neigh']" - feedback: "Mind the variable name and the order of the sounds." - - option: "sounds = '[woof], [moo], [neigh]'. " - feedback: "Look at line one to see how brackets are supposed to be used." - - option: "sounds = [woof, moo, neigh]" - feedback: "Don't forget the quotation marks!" - - option: "sounds = ['woof', 'moo', 'neigh']" - feedback: "Great job!" - correct_answer: "D" - hint: "Look at line 1 to see proper use of brackets and quotation marks." - question_score: "10" - 6: - question_text: "Which statement is true?" - code: | - people = ['Chris', 'Jaylino', 'Ryan'] - games = ['fortnite', 'minecraft', 'fifa'] - {for} o {in} {range} 1 {to} 3 - {print} people[o] ' likes ' games[o] - mp_choice_options: - - option: "You are not allowed to use the variable o. It should be named i." - feedback: "i is the most commonly used variable name in this case, but it's not mandatory to use i." - - option: "The output will say that Jaylino likes fortnite." - feedback: "No, he likes minecraft." - - option: "The output will say that Ryan likes fifa" - feedback: "Correct" - - option: "This code will not work. It will give and error." - feedback: "No, the code is correct." - correct_answer: "C" - hint: "There is nothing wrong with this code." - question_score: "10" - 7: - question_text: "What's wrong with this code?" - code: | - people = ['Savi', 'Senna', 'Fayenne'] - transportation = ['bike', 'train', 'car'] - {for} i {in} {range} 1 {to} 3 - {print} people[i] goes to school by transportation[i] - mp_choice_options: - - option: "Line 1 needs less quotation marks" - feedback: "That is not right." - - option: "Line 3 should start with indentation" - feedback: "It should not!" - - option: "Line 4 should start without indentation" - feedback: "It should not" - - option: "Line 4 needs more quotation marks." - feedback: "Amazing!" - correct_answer: "D" - hint: "There is a mistake made in the usage of quotation marks." - question_score: "10" - 8: - question_text: "What is a possible output for this code?" - code: | - countries = ['Canada', 'Zimbabwe', 'New Zealand'] - {for} i {in} {range} 0 {to} 1 - {print} 'I will travel to ' countries[random] - mp_choice_options: - - option: "test" - feedback: "That is not right." + 1: + question_text: Which command should be filled in on the blanks to print a random snack? + code: |- + snacks = nachos, chips, cucumber, sweets + {print} _ + mp_choice_options: + - option: '`snacks {at} {random}`' + feedback: This is the old way. + - option: '`[{random} snack]`' + feedback: The order is wrong. + - option: '`snacks[{random}]`' + feedback: Correct + - option: '`snacks[{at} {random}]`' + feedback: We do not need `at`anymore + hint: We no longer use {at} + correct_answer: C + question_score: '10' + 2: + question_text: What should be filled in on the blanks if you want a list of what chores are done by whom? + code: |- + friends = ['Wesley', 'Eric', 'Kaylee'] + chores = [the cooking, the cleaning, nothing] + {for} i {in} {range} 1 {to} 3 + {print} _ + mp_choice_options: + - option: friends[i] has to do chores [i] + feedback: Mind the spacing. + - option: friends[1] has to do chores[1] + feedback: It will print 3 times that Wesley has to do the cooking + - option: chores[i] has to do friends[random] + feedback: The person has to do the chore, not the other way around + - option: friends[i] has to do chores[i] + feedback: Fantastic! + hint: '`i` tells us what item in the list it is. So friend 1 does chore 1 etc.' + correct_answer: D + question_score: '10' + 3: + question_text: What is a possible output for this program + code: |- + friends = ['Wesley', 'Eric', 'Kaylee'] + chore = [the cooking, the cleaning, nothing] + {for} i {in} {range} 1 {to} 3 + {print} friends[i] has to do chores[i] + mp_choice_options: + - option: |- + Wesley has to do the cooking + Eric has to do the cleaning + Kaylee has to do nothing + feedback: Super! + - option: |- + Kaylee has to do the cooking + Wesley has to do the cleaning + Eric has to do nothing + feedback: No, it is not random. + - option: |- + Wesley has to do the cooking + Wesley has to do the cleaning + Wesley has to do the nothing + feedback: Poor Wesley! + - option: |- + Wesley has to do the cooking + Wesley has to do the cooking + Wesley has to do the cooking + feedback: That's not it + hint: It's not random... + correct_answer: A + question_score: '10' + 4: + question_text: What is wrong with this code? + code: |- + friends = ['Jaylee', 'Erin', 'Fay'] + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 0 {to} 3 + print 'the lucky number of ' friends[i] + print 'is ' lucky_numbers[i] + mp_choice_options: + - option: The variable in line 4 should be 'friend[i]', not 'friends[i]' + feedback: That is not right. + - option: Line 3 should say 'in range 1 to 3' not 'in range 0 to 3' + feedback: Good catch! + - option: Line 4 should say 'lucky_number', not 'lucky number + feedback: It's not a variable, it's just text. + - option: '{in} in line 3 should be removed' + feedback: That's not it + hint: There's nothing wrong with line 4 + correct_answer: B + question_score: '10' + 5: + question_text: Which line should be filled in in the blank? + code: |- + animals = ['dog', 'cow', 'horse'] + _ + {for} i {in} {range} 1 {to} 3 + {print} 'the ' animals[i] ' says ' sounds[i] + mp_choice_options: + - option: noises = ['moo', 'woof', 'neigh'] + feedback: Mind the variable name and the order of the sounds. + - option: sounds = '[woof], [moo], [neigh]'. + feedback: Look at line one to see how brackets are supposed to be used. + - option: sounds = [woof, moo, neigh] + feedback: Don't forget the quotation marks! + - option: sounds = ['woof', 'moo', 'neigh'] + feedback: Great job! + hint: Look at line 1 to see proper use of brackets and quotation marks. + correct_answer: D + question_score: '10' + 6: + question_text: Which statement is true? + code: |- + people = ['Chris', 'Jaylino', 'Ryan'] + games = ['fortnite', 'minecraft', 'fifa'] + {for} o {in} {range} 1 {to} 3 + {print} people[o] ' likes ' games[o] + mp_choice_options: + - option: You are not allowed to use the variable o. It should be named i. + feedback: i is the most commonly used variable name in this case, but it's not mandatory to use i. + - option: The output will say that Jaylino likes fortnite. + feedback: No, he likes minecraft. + - option: The output will say that Ryan likes fifa + feedback: Correct + - option: This code will not work. It will give and error. + feedback: No, the code is correct. + hint: There is nothing wrong with this code. + correct_answer: C + question_score: '10' + 7: + question_text: What's wrong with this code? + code: |- + people = ['Savi', 'Senna', 'Fayenne'] + transportation = ['bike', 'train', 'car'] + {for} i {in} {range} 1 {to} 3 + {print} people[i] goes to school by transportation[i] + mp_choice_options: + - option: Line 1 needs less quotation marks + feedback: That is not right. + - option: Line 3 should start with indentation + feedback: It should not! + - option: Line 4 should start without indentation + feedback: It should not + - option: Line 4 needs more quotation marks. + feedback: Amazing! + hint: There is a mistake made in the usage of quotation marks. + correct_answer: D + question_score: '10' + 8: + question_text: What is a possible output for this code? + code: |- + countries = ['Canada', 'Zimbabwe', 'New Zealand'] + {for} i {in} {range} 0 {to} 1 + {print} 'I will travel to ' countries[random] + mp_choice_options: + - option: test + feedback: That is not right.