Year 9 - Python Next Steps

3.6(7)
studied byStudied by 684 people
3.6(7)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

22 Terms

1
New cards

Arrays

A collection of items stored in memory. Each item can be selected using indexes. Can't be changed after created.

names = ("Ryan", "Brad", "Jimmy", "Steph")

2
New cards

Lists

A collection of items stored in memory. Each item can be selected using indexes. Differ from arrays as they can be changed after creating.

place = ["London", "Paris", "New York", "Tokyo"]

3
New cards

Procedures

A block of code with a name we want to reuse.

4
New cards

Functions

A block of code with a name we want to reuse and be able to pass values to it and get values back (Return).

We use them to make code shorter and it stops us having to write the same code over and over.

5
New cards

Data Type

The Classification of a piece of data.

6
New cards

Integer

A whole number (Positive or Negative).

7
New cards

Real (Float)

A number with a decimal point.

8
New cards

Arithmetic Operators

The operations used in calculations:+ " Add- " Subtract " "Multiply / Divide"^ " Exponent (To the Power Of) (* in Python)MOD " Modulo Division (Remainder) (% in Python)DIV " Integer Division (// in Python).

9
New cards

Add

+

10
New cards

Multiplication

*

11
New cards

Divide

/

12
New cards

MOD

Returns the remainder e.g. 9 MOD 4 returns 1, as that is what is left.

13
New cards

Character

A single alphanumeric character.

14
New cards

String

A sequence of characters.

15
New cards

Boolean

A single value of either TRUE or FALSE.

16
New cards

Iteration

Repetition - When something loops.

17
New cards

Greater than

When a number is larger than the other number. Example 65 > 56.

18
New cards

Less than

Less than is used to compare two numbers when the first number is smaller than the second number. Example 14 < 65.

19
New cards

Variable (Programming)

Used to store information in our program.

20
New cards

Selection (Programming)

Allows the computer to make a selection between alternative conditions; decisions choice, if/else.

if speed > 70:
print("Too fast, get a fine")
else:
print("Well done, driving is nice and steady")

21
New cards

Loop/iteration

FOR and WHILE can be used for iteration (repeating a series of instructions). For is used when we know how many times to repeat code, while when we don't. E.g.

while score < 50:

for i in range (0,3):

22
New cards

Parameter

A piece of data passed to a function from the main program - like a variable that allows the function to operate on specific inputs.