100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
Introductory CS Notes for Beginners €19,54   In winkelwagen

College aantekeningen

Introductory CS Notes for Beginners

 3 keer bekeken  0 keer verkocht
  • Vak
  • Instelling

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.

Voorbeeld 4 van de 35  pagina's

  • 13 oktober 2024
  • 35
  • 2023/2024
  • College aantekeningen
  • Mark gregory
  • Alle colleges
avatar-seller
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

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

√  	Verzekerd van kwaliteit door reviews

√ Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, Bancontact of creditcard voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper samikhasrinivasan. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €19,54. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 82956 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€19,54
  • (0)
  Kopen