100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Other

D278 Scripting and Programming Foundations notes – Final Exam| OA Notes 2025 NEW VERSION UPDATE Western Governors University

Rating
-
Sold
-
Pages
195
Uploaded on
13-07-2025
Written in
2024/2025

D278 Scripting and Programming Foundations notes – Final Exam| OA Notes 2025 NEW VERSION UPDATE Western Governors University












Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
July 13, 2025
Number of pages
195
Written in
2024/2025
Type
Other
Person
Unknown

Subjects

Content preview

D278 Scripting and Programming Foundations notes – Final Exam| OA
Notes 2025 NEW VERSION UPDATE Western Governors University




1.2 Programming basics


A first program
A flowchart is a graphical language for creating or viewing computer programs. Numerous flowchart languages exist. This
material uses the Coral language: A language intended for learning to program. A simple Coral flowchart program is
shown below.

A program is a list of statements, each statement carrying out some action and executing one at a time. In a Coral
flowchart, each statement is in a graphical node, with different shapes for different types of statements.



For Coral, an interpreter runs a program's statements. Run and execute are words for carrying out a program's

statements. A program also has variables, each being a name that can hold a value, like a variable x holding the value 7.

One kind of statement assigns a variable with a value; x = 7 assigns x with 7. Variable x continues to hold 7 until x is

,assigned a different value.



Basic input
Programs commonly get input values, then perform some processing on that input and put output values to a screen or
elsewhere. Input is commonly gotten from a keyboard, a file, fields on a web form or app, etc.

In a Coral flowchart, a parallelogram represents an input statement, written as: variable = Get next input. (A
parallelogram also represents an output statement, described below). The input statement assigns the indicated variable
with the next program input value.

,Basic output: Text
In a Coral flowchart, a parallelogram represents an output statement, written as: Put item to output. (A
parallelogram also represents an input statement, described above). The item may be a string literal or a variable. A string
literal consists of text (characters) within double quotes, as in "Go #57!". A character includes any letter (a-z, A-Z), digit
(0-9), or symbol (~, !, @, etc.).

A cursor indicates where the next output item will be placed in the output. The system automatically moves the cursor
after the previously-output item.

A newline is a special two-character sequence \n whose appearance in an output string literal causes the cursor to move
to the next output line. The newline exists invisibly in the output.



Outputting a variable's value
Outputting a variable's value is achieved via: Put x to output. No quotes surround variable x's name.

The animation below replicates the first program example from earlier. The program combines outputting of both a string
literal and a variable's value; such combination is common. Note that the programmer put a space at the end of "Salary is ",
causing the variable's value to appear on the same line and separated from the text, as desired.



Comments
A comment is text a programmer adds to a program, to be read by humans to better understand the code, but ignored by
the program when executing. In Coral, a comment starts with // and includes all the subsequent text on that line. The
comment must be on its own line.

Whitespace

, Whitespace refers to blank spaces (space and tab characters) between items within a statement, and to newlines.
Whitespace helps improve readability for humans, but for execution purposes much whitespace is ignored. The following
statements are equivalent, but the last one is most readable.


Engineers have reduced switch sizes by half about every 2 years, a trend known as Moore's Law. Such halving is
remarkable: Try repeatedly folding a sheet of paper in half and note how quickly the size shrinks (more than 7 paper folds
isn't even possible). By the 1970's, an entire computer could fit on one coin-sized device known as a computer chip.
Today, that 1940's room-sized computer could fit on a chip smaller than a pinhead.




The information age
Computers are a recent phenomenon and yet are rapidly transforming human civilization. Civilization's earlier agricultural
age lasted many thousands of years. The industrial age starting in the late 1700's transformed civilization towards
manufacturing goods, leading to mass migration to cities, creation of strong nations, world wars, doubling of lifespans
and thus dramatic world population growth (see figure below), and more. The information age just began in the 1990's,
with human activity shifting from traditional industry to creating/managing/using computerized information. In just those
few years, how people work, learn, communicate, or entertain themselves has already changed dramatically, but the
ultimate impact on civilization likely remains to be seen.



1.10 Code and pseudocode


Basics
Pseudocode is text that resembles a program in a real programming language but is simplified to aid human
understanding. "Code" is a term for a program written in text. "Pseudo" in this context means "similar to". Commonly, each
pseudocode text line corresponds to a program statement.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
smartzone Liberty University
View profile
Follow You need to be logged in order to follow users or courses
Sold
3220
Member since
6 year
Number of followers
2291
Documents
14517
Last sold
1 hour ago
AMAIZING EDUCATION WORLD

GET ALL KIND OF EXAMS ON THIS PAGE ,COMPLETE TEST BANKS,SUMMARIES,STUDY GUIDES,PROJECT PAPERS,ASSIGNMENTS,CASE STUDIES, YOU CAN ALSO COMMUNICATE WITH THE SELLER FOR ANY PRE-ORDER,ORDER AND ETC.

3.7

587 reviews

5
261
4
94
3
103
2
30
1
99

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions