[COSC 109] - Midterm Exam Guide - Ultimate 12 pages long Study Guide!

73 views12 pages

For unlimited access to Study Guides, a Grade+ subscription is required.

TU
COSC 109
MIDTERM EXAM
STUDY GUIDE
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 12 pages and 3 million more documents.

Already have an account? Log in
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 12 pages and 3 million more documents.

Already have an account? Log in
Chapter 10:
Programming:
What is programming? The process of writing computer programs
What is a program? A program is a set of instructions to accomplish a task
What is a programming language? A programming language is used to write programs (C++,
Javascript)
Its all about numbers
-everything in this universe can be represented by a number
-when we write a program, we have to deal with numbers
ex: SSN, TU ID, VIC, Credit score, GPA, DOB, address, zip code, any item at the
grocery store
How a program runs:
-a program is written as a sequence of statements as instructions
-the program executes the instructions sequentially - one instruction after the other, in
the order in which they appear in the code
-Example:
x = 10;
y = x + 2;
x = 3
Computer will store last value
Coding
Writing code:
-means entering the cod, is part of the process of creating the computer
program
Run, running, execution
Process by which the computer carries out the instructions
Compiling, compilation
-refers to the process of assembling code into a format suitable for the computer
to execute
What do you need to write a javascript program?
-a browser,
-text editor (MS notepad, notepad ++, editpad lite, sublime)
-Save the file as *.html
Programming languages:
Low level: machine language: a programming language that communicates with a
opute though s ad s
High level: programming languages that look more like human language, easy for human
to ead ad ite, ut euie oe taslatio behind the scenes to be understandable to
the computer. C++, C#, Java
Converts from low level to high level through assembly language
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 12 pages and 3 million more documents.

Already have an account? Log in
Scripting language; Javascript, Animate
-Very high level programming language
-Advantage: easier for non-programmer to learn because the syntax and
keywords are close to human language.
-Javascript is choice
-DOM (document object model )
-Document html head and body title and p lesson one
-Tree structure
Javascript Syntax
-prescribes the ways in which statements must be written in order for them to be
understood by the computer
-lime the rules of grammar and punctuation in human languages, but these rules must
be followed precisely in computer programming
-for examples, for javascript:
-case sensitive
-eah stateet…
-Have to start with a script tag
Variables:
-Purpose: to store values that can be updates and retrieved at runtime
-data is stored in memory as bits
-aiale lets ou fefe,  ae, to the datas eo loatio stoed
-has 3 properties:
name: code referts to memory location by name
value: the actual information stored at the location
-type:
Loove vs. Strict data typing
-strict data typing: when a programming language requires that you explicitly declare
the data type of a variable when the variable is first created
-loose data typing; when a programming language does not have such data typing
requirements Javascript is an example
Variable naming VERY IMPORTANT, CAN ASK A LOT OF QUESTIONS FROM THIS
-can contain a number, a letter, underscore, or dollar sign
-cannot begin with a number
-in this course, variables always begin with a letter
-must not contain spaces
-cannot be a keyword
-score and Score are different
-number and number are different
Which are valid variable names?
myScore valid my-score- invalid
my_score-valid my4score- valid
my score- invalid 4score invalid
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 12 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$10 USD/m
Billed $120 USD annually
Homework Help
Class Notes
Textbook Notes
40 Verified Answers
Study Guides
1 Booster Class