100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Introductory CS Notes for Beginners $20.49   Add to cart

Class notes

Introductory CS Notes for Beginners

 4 views  0 purchase

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.

Preview 4 out of 35  pages

  • October 13, 2024
  • 35
  • 2023/2024
  • Class notes
  • Mark gregory
  • All classes
All documents for this subject (4)
avatar-seller
samikhasrinivasan
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller samikhasrinivasan. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $20.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73216 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$20.49
  • (0)
  Add to cart