COMPINTRO ALGORITHM & PSEUDOCODE

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

lessons 5&6

Last updated 2:35 PM on 9/30/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

18 Terms

1
New cards

Algorithm

a set of well-defined instructions to solve a particular problem. It takes a set of input(s) and produces the desired output. 

2
New cards

Qualities of a good algorithm

  • Input and output should be defined precisely.

  • Each step in the algorithm should be clear and unambiguous.

  • Algorithms should be most effective among many different ways to solve a problem.

  • An algorithm shouldn't include computer code. Instead, the algorithm should be written in such a way that it can be used in different programming languages.

  • Consist of clear, practical steps executable in limited time by a person or machine.

  • Be unambiguous, with defined steps, including decision points (e.g.,“if” statements).

  • Have a finite number of steps, using loops for repeated actions.

  • Reach an endpoint, avoiding infinite loops.


3
New cards

How does Algorithm work

take a set of initial data or input, process it through a series of logical steps or rules, and generates an output, which can be the outcome, decision, or result.

4
New cards

Types of algorithms or control flow

  1. Linear Sequence Algorithm

  2. Conditional Algorithm

  3. Looping Algorithms


5
New cards

Types of algorithms or control flow: Linear Sequence Algorithm

follow a specific set or steps, one after the other.

6
New cards

Types of algorithms or control flow: Conditional Algorithm

make a decision between two actions.

7
New cards

Types of algorithms or control flow: Looping Algorithms

repeat a specific set of instructions multiple types until either a certain condition is met or a predefined number of repetitions has been completed.

8
New cards

Pseudocode

 defined as a step-by-step description of an algorithm. Pseudocode does not use any programming language in its representation instead it uses the simple English language text as it is intended for human understanding rather than machine reading.

9
New cards

Main constructs of pseudocode

  1. SEQUENCE

  2. WHILE

  3. REPEAT-UNTIL

  4. FOR

  5. IF-THEN-ELSE

  6. CASE


10
New cards

Main constructs of pseudocode : SEQUENCE

  • INPUT: READ , OBTAIN, GET

  • OUTPUT: PRINT, DISPLAY, SHOW

  • COMPUTE: COMPUTE, CALCULATE, DETERMINE

  • INITIALIZE: SET, INIT

  • ADD: INCREMENT

  • SUB: DECREMENT


11
New cards

Main constructs of pseudocode : FOR


<p></p>
12
New cards

Main constructs of pseudocode : WHILE


<p></p>
13
New cards

Main constructs of pseudocode :CASE

knowt flashcard image
14
New cards

Main constructs of pseudocode : REPEAT-UNTIL

knowt flashcard image
15
New cards

Main constructs of pseudocode :IF-THEN-ELSE

knowt flashcard image
16
New cards

Extra constructs of Pseudocode

  1. CALLING CLASSES or FUNCTIONS

  2. EXCEPTION HANDLING


17
New cards

Extra constructs of Pseudocode:CALLING CLASSES or FUNCTIONS

knowt flashcard image
18
New cards

Extra constructs of Pseudocode:EXCEPTION HANDLING


knowt flashcard image