Computer Programming

studied byStudied by 21 people
5.0(1)
get a hint
hint

Computer Programming

1 / 46

Studying Progress

0%
New cards
47
Still learning
0
Almost done
0
Mastered
0
47 Terms
1
New cards

Computer Programming

It means giving instruction or directions to accomplish specific task

New cards
2
New cards

Programmers

people who write computer programs

New cards
3
New cards

Programming Language

programmers use a specific language called _______ to communicate with the computer

New cards
4
New cards

9000+

there are approximately ______ programming languages used by software and web developers and other professionals

New cards
5
New cards

Compiler

converts programming language program to machine language

New cards
6
New cards

Interpreter

converts programming languages to machine language line by line

New cards
7
New cards

C. source code—compiler—assembler—machine code

How it works: code translator from source code to executable output
A. source code—assembler—-compiler——machine code

B. source code—machine code—compiler—-assembler

C. source code—compiler—assembler—machine code

New cards
8
New cards

Machine Language

  • Instructions written in 0s and 1s are called _______. ___________ language (each type of machine has its own language) represent the only way to communicate directly with the computer.

  • low level languages and can directly understand by computer but difficult to ready by humans

New cards
9
New cards

Assembly language

  • it simplify the programmer’s job by allowing the programmer to use mnemonics in place of the 0s and 1s in the program.

  • a representation of machine language. these are instructions translates to machine language instruction called assembler

New cards
10
New cards

High level language

  • It represent the next major development in programming languages. These languages are a vast improvement over machine and assembly language because they allow the programmer to use instructions that more closely resemble the English language.

  • these are mostly used by programmers today. these are easy to read and portable. it can be classified into functional, procedure oriented, object oriented, programming and logic programming languages

New cards
11
New cards

Step 1: Analyze the problem- problem outline and list of requirements

Step 2: Plan the algorithm- design algorithm using pseudo-code, IPO and flowcharts

Step 3: Check the algorithm- trace algorithm.

Step 4: Code the algorithm into a program- implement algorithms into code.

Step 5: maintenance: evaluate and modify the program if necessary. IPO chart is also applicable

steps in problem solving process

New cards
12
New cards

Algorithm

step by step solution to solve a problem or to accomplish specific task

New cards
13
New cards

Flowchart

graphical representation of algorithm. there are symbols and illustration to use

New cards
14
New cards

Pseudo code

tool to plan the algorithm and use short English statements.

The short English statements that represent an algorithm are called _________

New cards
15
New cards

programs

instruction given to a computer

New cards
16
New cards

IPO chart

use to organized the result of program analysis

New cards
17
<p>Process</p>
New cards
<p>Process</p>

Process

indicates any type of internal operation inside the Processor or memory

New cards
18
<p>input/output</p>
New cards
<p>input/output</p>

input/output

used for any _____/______ operation. indicates that the computer is to obtain data or output results

New cards
19
<p>Decision</p>
New cards
<p>Decision</p>

Decision

used to ask a question that can be answered in a binary format (yes/no, true/false)

New cards
20
<p>Connector</p>
New cards
<p>Connector</p>

Connector

Allows the flowchart to be drawn without intersecting lines or without a reverse flow.

New cards
21
<p>Pre-defined Process</p>
New cards
<p>Pre-defined Process</p>

Pre-defined Process

Used to invoke a subroutine or an interrupt program.

New cards
22
<p>Terminal</p>
New cards
<p>Terminal</p>

Terminal

Indicates the starting or ending of the program, process, or interrupt program.

New cards
23
<p>Flow lines</p>
New cards
<p>Flow lines</p>

Flow lines

shows direction of flow

New cards
24
New cards

Integer 4 bytes

int

New cards
25
New cards

float 4 bytes

float

New cards
26
New cards

double 8 bytes

double

New cards
27
New cards

boolean 1 byte

bool

New cards
28
New cards

character 1 byte

char

New cards
29
New cards

string 1 byte per character

string

New cards
30
New cards

identifiers

All C++ variables must be identified with descriptive unique names.

These unique names are called

New cards
31
New cards

•Names can contain letters, digits, and underscores

•Names must begin with a letter or an underscore (_)

•Names are case sensitive (myVar and myvar are different variables)

•Names cannot contain whitespaces or special characters like !, #, %, etc.

•Reserved words (like C++ keywords, such as int) cannot be used as names

The general rules for naming variables are:

New cards
32
New cards

==

equal to

New cards
33
New cards

! =

not equal to

New cards
34
New cards

<

less than

New cards
35
New cards

<=

less than or equal to

New cards
36
New cards

>

greater than

New cards
37
New cards

>=

greater than or equal to

New cards
38
New cards

true + true = true
true + false = false

false + true = false

false + false = false

&&

New cards
39
New cards

true + true = true
true + false = true

false + true = true

false + false = false

||

New cards
40
New cards

Sequence Structures

  • In a computer program, the _________ structure directs the computer to process program instructions, one after another, in the order listed in the programs.

  • a series of actions that is completed in a specific order. Action 1 is performed, then Action 2, then Action 3, etc,. until all of the actions in the sequence have been carried out.

New cards
41
New cards

Selection

indicates that a decision (based on some condition) needs to be made followed by an appropriate action derived from that decision.

New cards
42
New cards

Repetition

  • last of the three control structures. It directs the computer to repeat one or more instruction until some condition is met, at which time the computer should stop repeating the instructions. This structure also is referred to as a loop or an iteration.

  • or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next.

New cards
43
New cards

Control Structures

All computer programs, no matter how simple or how complex, are written using one or more of three basic structures: Sequence, Selection, and Repetition. These structures are called __________ or logic structures because they control the flow of a program’s logic.

New cards
44
New cards

while loop

The loop construct in C++ is used when the number of iterations is known beforehand is called _________

New cards
45
New cards

braces

In a C++ program, the body of a function is enclosed in ______

New cards
46
New cards

false

true && false

New cards
47
New cards

true

true || false

New cards

Explore top notes

note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 16 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 43 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 21161 people
Updated ... ago
4.9 Stars(166)

Explore top flashcards

flashcards Flashcard140 terms
studied byStudied by 17 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard45 terms
studied byStudied by 18 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard52 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard106 terms
studied byStudied by 20 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard181 terms
studied byStudied by 453 people
Updated ... ago
5.0 Stars(3)
flashcards Flashcard45 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard63 terms
studied byStudied by 5 people
Updated ... ago
5.0 Stars(3)
flashcards Flashcard342 terms
studied byStudied by 18054 people
Updated ... ago
4.5 Stars(88)