Intro to Programming Logic Flashcards

1
Q

What is a Sequence?

A

Statements executed one after another.

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

What is a Selection?

A

Statement used to make a decision.

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

What is a loop?

A

Statement used to repeatedly execute a section of code.

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

What are 3 basic software structures?

A

Sequence, Selection, and Loop

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

What does a declaration do?

A

Reserves an area of memory to hold computer data for a Variable. It also assigns this Variable a “Type” - ie String vs. Number

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

What does an Assignment Statement do?

A

Stores a value in a variable, Value may be the result of a calculation.

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

What does an Input Statement do?

A

Gets a value from the user and stores it as a variable.

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

What does an Output Statement do?

A

Displays information to the user (Including values of variables.)

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

What should be included in a comment?

A

~What does the program (or section of the program) do?
~Who wrote the program?
~When was it written?
~Who owns the program?
~Explains a complicated section of code

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

What are attributes of Strongly Typed Languages? Examples?

A

~Must indicate variable type in declaration
~Variable only stores the type of date declared
~Can NOT store different type data in the variable (programming error)

Strongly-typed programming languages: Flowgorithm, C, C++, C#, Java

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

What are attributes of Weakly Typed Languages? Examples?

A

Must declare variable, but type not required.
Variables can store different types of data.

Weakly-typed programming languages: Python, JavaScript, PHP

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

What is Pseudo-
code?

A

Informal English-Like code that implements an algorithm.

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

What is an algorithm?

A

A set of steps designed to solve a particular problem.

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

What is the software developments lifecycle?

A

Requirements Analysis, Design, Implementation, Testing, Deployment/Maintenance

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

What is Requirement Analysis?

A

It’s the first step in the Software Development Lifecycle that determines what the software should do to meet the needs of the customer

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

What is Design in the SDLC?

A

This is the second step meant to define and document a plan for the implementation of Software.

17
Q

What is Implementation in the SDLC?

A

This is the third step meant to code the software using a programming language.

18
Q

What is Testing in the SDLC?

A

This is the fourth step meant to verify the software is free from defects and conforms to the requirements.

19
Q

What is Deployment/Maintenance in the SDLC?

A

This is the fifth step meant to release the software and provide ongoing support.

20
Q

Describe a Boolean Expression.

A

Boolean Expressions result as True or False. They can calculate with literals (True or False) and Variables used in a comparison.

21
Q

What does a “While” loop do?

A

Tests a Boolean condition and repeats a section of code as long as the condition remains true.

22
Q

What is an indefinite “While” loop and how do you end them?

A

A loop that will execute an unknown amount of times. Code in a Sentinel Value and advise the user how to use it.

23
Q

What is a Sentinel Value?

A

A coded value that can end an indefinite “While” loop.

24
Q

What is an infinite “While” loop?

A

A loop that goes on forever usually due to a bug.

25
Q

What is a “Do While” loop?

A

A loop that checks the control variable after executing, ensuring it always runs at least once.

26
Q

What is a “For” loop?

A

A more compact way to create definite/indefinite counters.

27
Q

What are the stages of the “Instruction Cycle” for a processor?

A

Fetch, Decode, Execute, Repeat

28
Q

What is a bit?

A

A single Binary Digit of information (0 or 1)

29
Q

What is a Byte?

A

Eight bits; can represent a number 0-255 or 1 letter.