Programming Recap Flashcards

1
Q

What is a variable?

A

A named memory location to hold a single value​.

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

What is sequence?

A

Writing/following code in the correct order to solve a problem​.

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

What is iteration?

A

Repeating code for a set number of times or until a condition occurs​.

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

What is selection?

A

Choosing which code to execute based on a condition​.

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

What is an assignment?

A

Adding a value to a variable.

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

What is a list?

A

A collection of data items with a single identifier​.

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

What is a sub-routine?

A

Named, reusable sections of code, with or without parameters​.

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

What are the three types of sub-routines?

A
  • Procedures
  • Methods
  • Functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the differences between the three types of sub-routines?

A
  • Procedures don’t return a value​
  • Functions always return a value ​
  • Methods are used in Object Oriented Programming​
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a file?

A

A way to store data between executions of a program. Can be read from or written to.​

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

What are the 5 data types?

A
  • String
  • Real/float
  • Integer
  • Character
  • Boolean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between an input and an output?

A

Output - Displays anything relevant to the screen using the print statement​

Input​- Requests data from the user​

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

What type of statements is used for selection?

A
  • IF
  • SWITCH/CASE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What types of statements are used for iteration?

A
  • FOR
  • WHILE
  • DO UNTIL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between FOR and WHILE loops?

A

For loops​ are used when you know how many times you want to repeat the code​

While loops​ are used to repeat code until a condition occurs​

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