CS152

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/31

flashcard set

Earn XP

Description and Tags

Programming Paradigms

32 Terms

1
New cards

what are the drawbacks of assembly language?

lacks abstaction and machine specific

2
New cards

algol

defined standard notation for algorithms

3
New cards

von neumann model

sequentially execute instructions fetched from a memory unit where both programs and data is stored

4
New cards

von neumann bottleneck

CPU must wait for data to be transferred to/from memory which lowers effective processing speed

5
New cards

imperative language

sequential execution of instructions/commands, describes the steps towards the solution

6
New cards

procedural language

imperative language structured into procedures/functions

7
New cards

declarative languages

program describes the solution itself instead of how to get to it

8
New cards

examples of imperative paradigms

python, c, javascript, java

9
New cards

examples of functional paradigms

scheme, haskell, python, javascript

10
New cards

examples of logic paradigms

prolog

11
New cards

examples of object oriented paradigms

java, python, javascript

12
New cards

programming language syntax

sets rules of the language and defines which sequence of characters form valid paradigms

13
New cards

programming language semantics

describes the meaning of a language and the effects of executing the code

14
New cards

Is the following an example of imperative programming:


first = 5;

second = 6;

total = first + second;

first = 7;

print(total);

first = 1;

print(total);

true

15
New cards

The following program is an example of:

more_input = true;

while more_input:

first=get_input();

second = get_input();

total = add(first, second);

report(total);

more_input = false

both imperative and procedural

16
New cards

Which of the following contains a lexical error in Python?

grade?=95

17
New cards

How many tokens in grade = 95?

3

18
New cards

How many tokens in grade=95?

3

19
New cards

How many tokens in grade?=95?

2

20
New cards

What criteria should be used to judge a language?

Efficiency, Regularity, Security, Extensibility

21
New cards

What was the main concern for programming languages in the 60s?

writeability and readability

22
New cards

What was the main concern for programming languages in the 70s & 80s?

simplicity and abstraction

23
New cards

What was the main concern for programming languages in the 80s & 90s?

logical and mathematical precision

24
New cards

What was the main concern for programming languages in the last 25 years?

object oriented abstraction

25
New cards
26
New cards

Design Criteria: Efficiency

traditionally the efficiency of execution, now leans towards programmers efficiency with how quickly and easily a programmer can write/read in a language

27
New cards

Design Criteria: Regularity

how well the features of a language are integrated; greater regularity implies less surprises

28
New cards

Design Criteria: Security

reliability enhanced through imposing restrictions

29
New cards

Design Criteria: Extensibility

ability to add features to the language

30
New cards

What was the primary design concern in the older days when machines were slow and memory was scarce?

efficiency of execution

31
New cards

Which of the following has a more efficient execution?

JAVA

int first, int second;

first = 30;

second = 35;

total = first + second;

32
New cards

Which of the following has better programmers efficiency?

PYTHON
print(“Hello World!”)