Year 11
Lesson details
Key learning points
- In this lesson, we will explore some common list methods through the creation of a program that populates a deck of cards. We will also learn how lists can be returned from a function.
Licence
This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.
Loading...
4 Questions
Q1.
What will be the output of print, when this program is executed?
house, mountain
mountain
u
Q2.
Is an array static or dynamic?
Dynamic
Q3.
Is a list static or dynamic?
Static
Q4.
What will be the output of print, when this program is executed?
Days
Monday
Sunday
3 Questions
Q1.
What method should you use to add something to the end of a list?
add()
insert()
plus()
Q2.
What method should you use to sort a list in ascending order?
ascending()
atoz()
sort(ascending)
Q3.
True or False: You can return a list from a function
False