diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml index 23f8cd7f43b..af5d96cf509 100644 --- a/content/quizzes/en.yaml +++ b/content/quizzes/en.yaml @@ -3540,3 +3540,157 @@ 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 + 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.