Select a course.
Advanced Python
infoWhy this? Understanding input, output, selection, iteration, subroutines, lists and random number generation is essential because these are the fundamental building blocks of Python programming. Students need to know how to collect and store user data using input() and variables, display information with print(), and make decisions through selection using if, elif and else statements. They must also understand how loops allow programs to repeat instructions efficiently, how subroutines make code reusable and easier to maintain, and how lists enable multiple pieces of data to be stored and managed within a single variable. Learning how to import and use the random module introduces students to creating interactive and dynamic programs.
scheduleWhy now? These concepts are taught now because they provide the foundation for all future programming tasks and are key knowledge required for success in GCSE Computer Science. Mastering these skills will enable students to design, write, test and improve increasingly complex programs with confidence and independence.
neurologyYou need to know
- input() is used to collect data from a user.
- input() stores data as a string.
- you can convert data to an integer using int().
- inputs are stored in a variable.
- print() is used to display information.
- variables and messages can be displayed together.
- output helps the user see results.
- Selection allows decisions to be made.
- selection used if, elif, else commands.
- selection uses comparison operators: ==, !=, >, >=, <=.
- a FOR loop is used when the number of repetitions is known.
- a FOR loop uses range() to indicate number of times the loop is performed.
- a WHILE loop is used when the number of repetitions is unknown.
- A WHILE loop repeats while a condition is true.
- a subroutine is a reusable block of code.
- functions and procedures are types of subroutine.
- subroutines are created using def.
- subroutines can be called multiple times.
- subroutines can receive parameters.
- functions can return values using return.
- functions must return a value while a procedure doesn't.
- a list stores multiple values in one variable.
- lists use square brackets [ ].
- the first item is always at index 0.
- you can access, add and count items
- The random module must be imported.
- How to generate a random integer.
- How to select a random item from a list.
- the random module must be imported.
- you can generate a random integer.
- you can select a random item from a list.
rocket_launchYou must be able to
- use input() to collect data.
- use print() to display data.
- write if, elif and else statements.
- create and use for loops.
- create and use while loops.
- create a function using def.
- call a function correctly.
- use return in a function.
- create and access a list.
- add items to a list using append().
- find the length of a list using len().
- import the random module.
- generate a random number using random.randint().
- choose a random item using random.choice().