Programming Flashcards

(21 cards)

1
Q

What is an algorithm?

A

A precise set of instructions to complete a task.

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

What is a sequence?

A

A set of step by step instructions.

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

What is iteration?

A

Repeating - a line of code can repeat several times.

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

What is selection?

A

If statements test to see if a condition is met and react to that.

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

What is a variable?

A

Storage location to store data that can then change. Score = 0

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

What is a program?

A

A series of step by step instructions that tell a computer how to solve a task.

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

What is print?

A

A function that allows you to display information to the user. Eg print(“Hello”)

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

What is an if statement?

A

Tests to see if something meets a condition. Eg If password == “1234”

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

What is an else statement?

A

Runs if a condition is not met.

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

What do you do if you want to enter a number?

A

Int(input(“enter a number”))

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

What data type is “hello world” an example of?

A

String

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

What data type is 90 an example of?

A

An integer

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

What data type is 9.5 an example of?

A

Float

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

What data type is true an example of?

A

Boolean

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

What does == mean?

A

Equal to

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

What does > mean?

17
Q

What does < mean?

18
Q

What does >= mean?

A

Greater than or equal to

19
Q

What does <= mean?

A

Less than or equal to

20
Q

How would you print hello Emily?

A

print(“Hello Emily”)

21
Q

How would you make it so a user input is needed for a variable?

A

variable = input(“…”)