Upgrade to remove ads
Computer Science - Year 9 - Cycle 1
Terms in this set (27)
Order that the code is carried out
Repeating sections of code that loop.
Using code to choose what happens in a program, also called a conditional.
A section of a program that performs a specific task and does not return a value.
A section of a program that performs a specific task and returns a value.
Also known as an array, is a way of storing a list of linked items.
A value that can changed, used to store information used in the code.
Using the tab key will create a space moving the code to the right. Use indentation for code that you want run within a selection condition or during iteration.
Variable specific to a function
take an action depending on whether a comparison gives true or false
used for variable assignment
used for comparison
used for comments
Counter controlled iteration
loops for a specified amount of times
Condition controlled iteration
loops while a condition is true
Example Code - Counter controlled iteration
1. for counter in range(1,6):
Example Code - Condition controlled iteration
1. counter = 1
4 counter = counter + 1
forcing data to be a specific data type.
Alphanumeric data - numbers and letters.
A whole number.
A true or false value.
A number with a decimal point
Multiple items (data) under one name (place holder)
Example code for List/Array
mylist = ["apples", "tomatoes", "pears"]
Example code - selection
1. age = input("what is your age?")
2. print("you are: ", age)
3. If (age>=17):
4. print("You can drive!")
6. print("You are too young")
Example code - Subroutine
1. def sayhello(name):
2. print("Hello, ", name)
3. username = "Bob"
Subroutines, procedures and functions
a section of code that can be re-used several times in the same program. It is separate from the main code and has to be 'called' upon using a defined name.
THIS SET IS OFTEN IN FOLDERS WITH...
Data Representation - Images
Year 9 ICT - Python Programming The Knowledge
Python Programming Syntax
Computer Science - Year 9 Revision
YOU MIGHT ALSO LIKE...
J276 CS Paper 2- Year 10 Easter revision
OCR GCSE Computing, Programming (Paper 2)
Coding with Karel Test
OTHER SETS BY THIS CREATOR
Year 9 - Cycle 1 - Keywords
Year 8 - Cycle 1 - Key Words
Year 7 - Cycle 1 - Keywords
1-6 GCSE SLR