8.2 Programming Flashcards

1
Q

What is an algorithm?

A

A set of instructions the computer follows in sequence?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a sequence?

A

The order the program runs in.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a variable?

A

A location in memory that stores one piece of data. It can change as the program runs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is iteration?

A

When a block of code repeats/loops?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two iteration loops used in Python

A

A for loop is count controlled, whereas a while loop is condition controlled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is iteration used in a program?

A

To make the program more efficient, e.g. less lines of code so the program runs faster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does selection mean?

A

The user has a choice and the program has different routes to follow based on the choice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the key terms you would expect to see when reading a selection statement?

A

If/elif/else

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of indentation

A

The code belongs to the specific selection statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Write a print statement

A

print(‘A print statement’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Write an input statement for to user entering their name

A

name = input(‘Enter your name: ‘)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do the four types of malware get into the computer system:
Virus, worm, trojan and ransomware?

A

Virus - attaches
Worm - duplicates
Trojan - pretends
Ransomware - locks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a list?

A

A location in memory that stores multiple elements under one name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between a variable and a list?

A

A variable can only store one element whereas a list stores multiple elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How is a list defined in Python?

A

listName = [] (square brackets)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is computational thinking?

A

Computational thinking is about breaking a big problem into smaller manageable problems: Abstraction - selecting the relevant information, Decomposition - breaking it down into steps, Algorithmic thinking - writing short programs for each step.

17
Q

What is a structure diagram?

A

A structure diagram is a decomposition tool that shows visually the different steps in solving the problem.

18
Q

When have I come across computational thinking before?

A

Maths - BIDMAS: Brackets, Indices , Division, Multiplication, Addition and Subtraction.

19
Q

What is Python?

A

Python is a text-based programming language, which is close to the English language and is translated in order for a computer to understand.

20
Q

What is an algorithm?

A

An algorithm is a set of instructions that a computer needs to follow in order/sequence.

21
Q

What are de Facto standards in programming?

A

De Facto standards are the expected standard of presentation when writing programs, including title-author-date, this program is designed to… and #comments throughout code.

22
Q

What is an array?

A

An array is another word for a list. An array/list store multiple pieces of data in one location.

23
Q

What is a variable?

A

A variable stores one piece of data, and can change at the program runs?

24
Q

How is an array shown in Python?

A

With a name for the array and square brackets, e.g. studentList = [ ]

25
What is iteration?
When a block code is repeated either until a condition is met or for a certain number of times.
26
What key terms would you expect to see when reading iterative statements?
For loop or while loop
27
What is the purpose of indentation
Repeat the block of code with the iterative statement
28
What is computational thinking?
Computational thinking is where you take a big problem and break it down into steps and work through logically.
29
Write a print statement
print(‘A print statement’)
30
Write an input statement for to user entering their name
name = input(‘Enter your name: ‘)
31
What does selection mean?
The user has a choice and the program has different routes to follow based on the choice
32
What are the key terms you would expect to see when reading a selection statement?
If/elif/else
33
What is the purpose of indentation?
The code belongs to the specific selection statement