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

Introductory CS Notes for Beginners

Rating
-
Sold
-
Pages
35
Uploaded on
13-10-2024
Written in
2023/2024

This document highlights important concepts and fundamental tools needed to code Java programs. It covers essential terms and vocabulary was well as syntax needed to code. Moreover, it is organized by topic so that it is easy to navigate and use.

Show more Read less











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

Document information

Uploaded on
October 13, 2024
Number of pages
35
Written in
2023/2024
Type
Class notes
Professor(s)
Mark gregory
Contains
All classes

Subjects

Content preview

Intro to CS Notes




Samikhaf
.

,① AlgorithmicThinking :
I toannizetr
-
asolve on
computational presi s




Naive Ideal : Natural
language instructions


PrepackagedSolutions lapps

:
Programming telling a computer what to do




Machine Language : easy for Computer , error-prone for human




Natural Language : easy for human
, error-prone for computer



High-level language : Some
difficulty for both




"Coding" Environment :
using set of pseudocode instructions to express a solution
algorithmically

An
algorithm Step-by-step process of
solving a problem
:




Ex : Problem : Find Sum of 2 numbers
=
Read X

Algorithm :
Ready
X+
Display y




Algorithm Development : As a 3 step process , with fedback




① Analyne : understand the problem you are
solving (inputs
& outputs , errors ,
exc .


② Solve : develop a step-by-step algorithm , use a
"language" to express i t



③ Evaluate :
Play a human computer to see how the algorithm wo r ks




Computational Thinking : Set of
problem-solving methods that involves expressing problems & their solutions




Stages of It : -



> Abstraction
-
problem formulation



>
-
Automation solution t h a t a machine
expressing a can execute



>
-
& evaluation
Analyses solution execution




I intended fo r h u m an

Pseudo Language : An informal high-level description of a computer program reading



helps express algorithm i n the
design cycle
-


High-level components in
Program Development :

in put



output


compute




Definitions terms used
pseudo language &
~
in
programming using a




variable) an entity that may change its value (e g .
temperature

>
constants a va l u e that does not
change (e .
g4)

expression( variables, constants and operators grouped together
to show value of
something (e g. . X& S +
y

, <
Boolean expression > an expression that evaluates to
TRUE/FALSE (e g. n> 3)


Statements a combination of expressions le g. Compute X As X+ 3)




Pseudo language Vocabulary :

110 Initialization Flow Control Repetition Nested Increment/Decrement
Computation If Then While - End while Nested -
For Add
Read
-




Set
Display If-Then-Else Do -
While Nested -
For-If Subtract
compute
Nested If-Then-Else Repeat -
until

For-End For




comparisons Arithmetic Operations Boolean operations Terminate Program

t NOT
L
HALT
-
AND
L =
* OR
7
/
> =
% - remainder

iS

!




Input : Read data from
memory [CRAMSJ or from an input device (keyboard/ disk)

Output : Display / write results to an output device (terminal/disk/printer)





Read

new
( va r i a b l e temperature
:




: lay
Display variable/constant temperature




Initialize :




Using the SET statement in the pseudo language


>
-
SET <variable) TO < constant/variable



>
-
SET X TO 10




Compute

Using the COMPUTE statement in the pseudo language

>
-



COMPUTE <variable) A s expression >


>
-

COMPUTE X As
ytz




Flow Control One-way Branching :
-




IfThen .

One-way branching based on the condition
being TRUE


(number > 0
: If <Boolean-expression)
Display positive
Then


<
Statement/statements >
ENDIF

, Flow Control -


Two-way Branching :-




I f then-Else :
is based
Two-way branching on Condition being TRUE Or FALSE



Bortemperatureo
# If
day
The


stuisplay cod arents
ELSE
ants
Display , mid
ENDIF




Flow Control-Multi-way Branching :

Nested i f then-else multi
branching based &
:
way on condition being TRUE or FALSE more



temperature yo
: If <Brolean-condition) THEN


StaSPYcodasa
ELSE


If <Botmprature THE

< SESPLAYnota
sents
ELSE
DISPAYmidaySee n t
ENDIE

ENDIF




Iterations- WHILE Loop :




Initialization (optional (
-
Bookan Expression. Evaluate a Boolean expression
-
IF TRUE
· Execute a sequence of statements
-

Repeat
-
Set n to 3
Set sum to0
< initialization Statements >


:
n> 0
WHILE (Boolean
expression] -




COMPUTE Sum As S u m t n
statements if Boolean expression is true >


END SUBTRACT I FROMT




Iterations -
FOR
Loop :
-




Initialization. Evaluate an initiation statement
-
Boolean Expression. Evaluate a Boolean expression
-

EXTRUE . Execute a sequence of statements


Execute an increment statement

Repeat
-




For eachanyofthea we




Ex yofthece and
:


END FOR
$20.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
samikhasrinivasan

Get to know the seller

Seller avatar
samikhasrinivasan Rutgers University - New Brunswick/Piscataway
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
1 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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