Error
There was an error loading the page.
The student is shown a passage of code in the prompt to a "choose several from a list" part.
Metadata
-
England schools
-
England university
-
Scotland schools
Taxonomy: mathcentre
Taxonomy: Kind of activity
Taxonomy: Context
Contributors
History
Christian Lawson-Perfect 1 year, 8 months ago
Published this.Christian Lawson-Perfect 1 year, 8 months ago
Created this.There is only one version of this question that you have access to.
Name | Type | Generated Value |
---|
code | string |
def f(x):
return x*x
a =
|
Generated value: string
def f(x):
return x*x
a = [f(i) for i in range(10)]
This variable doesn't seem to be used anywhere.
Choose several from a list
Ask the student a question, and give any hints about how they should answer this part.
Examine the following Python code:
{code_block(code)}
Tick all of the accurate statements about this code.
-
The function f squares its input.
-
The list comprehension a uses an anonymous function.
-
The variable a is defined in the scope of f.
-
a is a list with 10 elements.
Use this tab to check that this question works as expected.
Part | Test | Passed? |
---|---|---|
Choose several from a list | ||
Hasn't run yet |