Prog Finals Flashcards

1
Q

A computer programing task can be divided into two phases:

A

Problem solving phase & implementation phase

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

Is an artificial and informal language that helps programmers develop algorithms. This is very similar to everyday English.

A

Pseudocode

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

Is another algorithm but graphical.

A

Flowchart

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

Denotes the beginning or end of the program.

A

Oval

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

Denotes an input operation.

A

Parallelogram/Rhombus

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

Denotes a process to be carried out
e.g. addition, subtraction, division etc.

A

Rectangle

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

Denotes a decision (or branch) to be made.
The program should continue along one of
two routes. (e.g. IF/THEN/ELSE).

A

Diamond

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

Denotes an output operation.

A

Hybrid

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

Denotes the direction of logic flow in the program.

A

Flow line

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

Flowchart Control Structures

A

-Sequence
-Decision
-Loop
-Case

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

Computer language consisting of mnemonics that directly correspond to machine language instructions.

A

Low level languages

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

Basically symbolic languages that use English words and/or mathematical symbols rather than mnemonic codes.

A

High level languages

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

Very close to machine language.

A

Low level languages

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

Concentrate on machine architecture.

A

Low level languages

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

Machine-independent programming language.

A

High level languages

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

Concentrate of the logic of problem.

A

High level languages

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

What are the low level languages?

A

Machine language & assembly language

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

What are the high level language?

A

C, C++, BASIC, Java

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

Who is pythons creator?

A

Guido van Rossum

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

Who is pythons developer?

A

Python Software Foundation

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

When was python released?

A

February 20, 1991

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

What is the recent software version of python?

A

Python 3.10.6

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

Python was named after ____.

A

Monty Python

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

Useful as a scripting language.

A

Python

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

Open source, scalable and object oriented.

A

Python

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

IDLE stands for

A

Integrated Development Environment for Python

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

Not compiled like Java. Code is written and then directly executed by an interpreter. Type commands into interpreter and see immediate results.

A

Interpreted

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

Unlike Java, Python does not have this.

A

Main Method

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

Python statements do not end with semicolons. True or False.

A

True

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

What do we do in problem solving phase?

A

Make ordered sequence.

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

The ordered sequence made in problem solving phase is called the ____.

A

Algorithm

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

This is typically used on windows.

A

IDLE

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

Code is written and then directly executed by an interpreter.

A

Interpreted Language

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

These are names for values.

A

Variables

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

These can be assigned to other variables.

A

Variables

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

Value do have ____.

A

Types

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

+

A

Addition

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

-

A

Subtraction

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

*

A

Multiplication

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

/

A

Division

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

**

A

Exponentiation

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

What are the basic data types?

A

Integers, Floats, & Strings

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

Use ____ when must go to next line prematurely.

A

/ or backslash

44
Q

Block structure is indicated by this.

A

Indentation

45
Q

= is for

A

Assignment

46
Q

== is for

A

Comparison

47
Q

+ is for

A

String Concatenation

48
Q

% is for

A

String Formatting

49
Q

What are the logical operators?

A

and, or, not

50
Q

Basic printing command is ___.

A

Print

51
Q

x==y

A

equals y

52
Q

x<y

A

is less than y

53
Q

x>y

A

is greater than y

54
Q

x>=y

A

is greater than or equal to y

55
Q

x<=y

A

is less than or equal to y

56
Q

x!=y

A

is not equal to y

57
Q

x is y

A

is the same object as y

58
Q

x is not y

A

is not the same object as y

59
Q

x in y

A

is a member of y

60
Q

x not in y

A

is not a member of y

61
Q

Allow us to execute a statement or group of statements multiple times.

A

Loop Statements

62
Q

What are the Loop Statements?

A

While Loop
For Loop
Range

63
Q

Are used to change the flow of execution from its normal sequence.

A

Loop Control Statements

64
Q

What are the Loop Control Statements?

A

Break
Continue
Pass

65
Q

Repeats a statement or group of statements while a given condition is TRUE.

A

While loop

66
Q

Executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

A

For loop

67
Q

Used in case the need is to iterate over a specific number of times within a given range in steps/interval mentioned.

A

Range function in loops

68
Q

Terminates the loop statement and transfers execution to the statement immediately following the loop.

A

Break statements

69
Q

Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

A

Continue statements

70
Q

Is never executed.

A

Pass statements

71
Q

Used when a statement is required syntactically but do not want any command or code to execute or if the code need to be implemented in the future.

A

Pass statements

72
Q

Behaves like a placeholder for future code.

A

Pass statements

73
Q

Binary. Evaluates to true if both expressions are true.

A

and

74
Q

Binary. Evaluates to true if at least one expression is true.

A

or

75
Q

Unary. Returns true if the expression is false.

A

not

76
Q

Basically a data structure which can hold more than one value at a time.

A

Array

77
Q

It is a collection or ordered series of items at the same time.

A

Array

78
Q

Each item stored is an array is called ____.

A

Element

79
Q

Each location of an element in an array has a ___.

A

Numerical Index

80
Q

Enumerate basic array operations:

A

*

81
Q

Number of elements present in an array.

A

Length of an array

82
Q

What function to use in finding the length of an array?

A

len()

83
Q

This function returns an integer value that is equal to the number of elements present in that array.

A

len()

84
Q

Used to iterates over the items of an array specified number of times.

A

For loop

85
Q

Iterates the elements until a certain condition is met.

A

While loop

86
Q

This function is used when we want to remove an element and return it.

A

pop()

87
Q

This function is used when we want to remove an element with a specific value without returning it.

A

remove()

88
Q

Arrays concatenation is done using _ sign.

A

+

89
Q

An array can be sliced using the _ symbol.

A

:

90
Q

This returns a range of elements that we have specified by the index number.

A

Slicing an array

91
Q

This function is used to sort an array.

A

sorted()

92
Q

Format use in sorting in descending order.

A

sorted(array_name, reverse=true)

93
Q

Is used to add a single element at the end of an array.

A

append()

94
Q

Is used to add a more than one element at the end of the end of an array.

A

extend()

95
Q

Is used to add an element at the specific position of an array.

A

insert()

96
Q

Removes all the elements from the list.

A

clear()

97
Q

Returns a copy of the list.

A

copy()

98
Q

Returns the number of elements with the specified value.

A

count()

99
Q

Returns the index of the first element with the specified value.

A

index()

100
Q

Reverses the order of the list.

A

reverse()

101
Q

Enumerate types of arrays.

A

1D Array
2D Array
Multi D Array

102
Q

A _____ is a block of organized, reusable code that is used to perform a single, related action.

A

Function

103
Q

Provide better modularity for the applications and a high degree of code reusing.

A

Function

104
Q

Differentiate python and c++ in terms of line codes.

A

*

105
Q

Differentiate python and c++ in terms of garbage collection.

A

*

106
Q

Differentiate python and c++ in terms of syntax.

A

*