Exam 3 cs101

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

symbol used for comments in python(no output)

#

programming paradigms

A programming methodology or approach, as in the object-oriented paradigm

logic programming

A style or paradigm of computer programming exemplified by the language Prolog.

aggregate type(structure, record, heterogeneous array)

a block of data in which different elements can have different types

array

a block of elements of the same type such as one-dimensional list, a two-dimensional table with rows and column, or tables with higher dimensions

method(object-oriented)

a collection of functions that are inside an object

define iterative structures

a collection of instructions is repeated in a looping manner

define programming language

a collections of primitives along with a collection of rules stating hoe the primitives can be combined to represent more complex ideas

define parameter

a formal argument of a piece of code

assembly language

a mnemonic system for representing programs

define pseudocode

a notational system in which ideas can be expressed informally during the algorithm development process

functional paradigm

a program is viewed as an entity that accepts inputs and produces outputs

calling unit of a function

a program unit that requests the execution of a function

function

a set of instructions for performing a task that can be used as an abstract tool by other program units

define loop

a set of instructions is executed in a repetitive fashion under the direction of some control process

what is the informal definition of an algorithm

a set of steps that define how a task is performed

define function

a small algorithm that can be called in later code

fields

individual data items that make an aggregate type

components of loop control

initialize, modify, test

indices

integer values that specify the row, column, and so on

object-oriented paradigm/object-oriented programming

a software system is viewed as a collection of inputs, called objects, each of which is capable of performing the actions that are immediately related to itself as well as requesting actions of other objects- the objects work together to solve the problem at hand

local variable

a variable declared within a function that can only be referenced within the function

control statement

alters the execution sequence of the program

what is the formal definition of al algorithm

an algorithm is an ordered set of unambiguous, executable sets that defines a terminating process

general purpose algorithm

an algorithm that can be used in multiple contexts that get the same result

instance

an object of a particular class

declarative paradigm

asks a programmer to describe the problem to be solved rather than an algorithm to be followed(uses a pre-established algorithm to solve the problem)

why is assembly language hard to transfer between two computers

assembly language is inherently machine dependent because of the syntax of the assembly code, the code must be rewritten to conform to the new computer's register configuration and instruction set

common pseudocode

assignment statement, if/else statements, while loops, functions

operator precedence

certain operations are given precedence over others

termination condition

condition that causes a loop to stop

boolean

data items that can take on only the values true or false

integer

data type that refers to the numeric data consisting of whole numbers

primitive data types

data types that are included in primitives in a programming language (int/integer char/character)

what kind of statements does a program have

declarative, imperative, and comments

declarative statement

define customized terminology that is used later in the program, such as the names used to reference data items

imperative statement

describe steps in the underlying algorithms

for-each loop

describes a loop that iterates through each element of a list

variable

descriptive name in high level languages that allow locations in main memory to be refrenced

constant

descriptive name that is assigned to a specific, nonchangeable values

unambiguous algorithm definition

during execution, of an algorithm, the information in the state of the process must be sufficient to determine uniquely and completely the actions required by each step

data type

encompasses the manner in which the data is encoded, and the operations that can be performed on that data

comments

enhance the readability of a program

interpretors

execute instructions as they are translated instead of recording the translated version for future use(actually execute high-level code)

comment

explanatory statement

literal

explicit appearance of a value

variable names in python can start with a number (true/false)

false

variable names in python must start with a lower-case letter (true/false)

false

how can semantics be represented

flowchart

what is the major technique for obtaining a modular representation of a program in imperative language

function

parameter

generic terms within functions

purpose of a blank line of code

make the code easier to read

overloading

multiple use of an operation symbol

what does the ordered part of an algorithm entail

must have well established structure in terms of the order of their execution

what's the difference between natural languages and formal languages

natural languages(english, spanish, german) are languages that evolved over time without formal grammatical analysis, formal language(programming languages) are created by grammars

float(sometimes called real)

numeric data that might contain values other than whole numbers, probably stored in floating point notation

what does indentation and comments enhance in a computer program

readability

assembler

reads assembly language and converts it into code

define program

representation of an algorithm, in the cs community it usually refers to the formal representation of an algorithm designed for computer application

define arguments

required values that allow a function to execute

define assignment statement

saves data so programmers can refer to it later(saves a value to a variable)

function header

statement that identifies the name of the function

list ways of representing algorithms

stepwise refinement

operator

symbol that assigns a value to something(=)

imperative paradigm/procedural paradigm

tells us to approach the problem by finding an algorithm to solve the problem at hand and then expressing that algorithm as a sequence of commands

define process

the activity of executing a program/algorithm

sequential search algorithm

the algorithm considers the entries in the sequential order in which they occur in the list

define effective

the concept of being executable

data structure

the conceptual shape or arrangement of data

class

the description of an objects properties

why is there no significance to machine independent third languages falling short of actually being machine dependent

the language is so close to being independent the code can be moved with little ease, machine independence was only a seed the programmers needed to realize they want to work with abstract concepts and computers

define semantics

the meaning of the primitive

define syntax

the primitive's symbolic representation

calling/invoking a function

the process of transferring control to a function

define stepwise refinement

the technique of not trying to conquer an entire task at once-breaking up the problem into smaller problems

formal parameters

the terms used within the function

posttest loop

the test for termination is performed after the body is executed(repeat loop structure)

pretest loop

the test for termination is performed before the body is executed(while loop structure)

machine independent

they do not rely on the characteristics of a particular machine

translator

translates programs expressed in these high-level primitives into machine language programs

variable names in python are case sensitive

true

variable names in python may not include spaces (true/false)

true

purpose of a comment line

used to describe the purpose/behavior of the code

global variables

variables whose scopes are not restricted in a particular part of a program

primitive

well defined set of building blocks from which algorithm representations can be constructed

what python primitive corresponds to two jump instructions

while

is an assignment statement imperative

yes

examples of machine independent languages

FORTRAN, COBOL

debugging

Finding and fixing problems in your algorithm or program.

identifiers

often called program variables, identifiers have descriptive names to help represent the meaning of the code

structured programming

organized design methodology combined with the appropriate use of the language's control statements

scope

portion of a program in which a variable can be referenced

list the means of repeating a block of instructions

pretest loop, posttest loop, recursion

how would program extensions mess up computer independence

program extensions are not universally available on all computers, so the code would not work

procedure

program segment isolated as a unit with a name

insertion sort

program that sorts a list by repeatedly removing an entry and inserting it into its proper place

compilers

programs that automatically translate high-level language programs into executable programs(type of translator)

top-down methodology

progresses from general to specific

bottom-up methodology

progresses from specific to general

more intuitive notational system

pseudocode


Kaugnay na mga set ng pag-aaral

Air Methods Part 135 Study Guide

View Set

Data Collection, Behavior, and Decisions

View Set

Efficient Markets Hypothesis (EMH)

View Set

Physics 19, 20, 21 Clicker set 1

View Set

"Declaration of Sentiments" (With "Giving Women the Vote")

View Set