Saturday, 24 August 2024

Python Tutorial - 2 - Class 11 Computer Science - Flowchart

Flowchart

·        A flowchart is a graphical representation of an algorithm.

·        A flowchart contains various shapes which are connected by arrows, which showing the flow of control.




Draw a flow-chart to identify whether a number taken as the input from the user is an even number or an odd number?



Pseudocode

·        Pseudocode is a way of representing an algorithm.


·        Pseudocode is not an actual program. So, it cannot be executed.

·        Some of the frequently used keywords while writing pseudocode are INPUT, COMPUTE, PRINT IF/ELSE, START, STOP


Advantages of Pseudo-Code:


·        Easily convertible to a Programming Language


·        Easy to understand and read


Write a pseudocode for identifying if a number is even or odd?

INPUT number A

COMPUTE remainder as r = A%2

IF r ==0 PRINT 'Even'

ELSE PRINT 'Odd'

Decomposition

Decomposition is the process of breaking a complex computer problem into smaller parts that are easily manageable and solvable.



 

No comments:

Post a Comment