Wednesday, February 1, 2023

Pseudocode

 ┌───── •✧✧• ─────┐
Pseudo Code
└───── •✧✧• ─────┘
Youtube Link;
YT: 2.1.2 How to write pseudocode ( IGCSE /O level Computer Science) 


Text Link:
001) How to write a Pseudo Code? ... https://www.geeksforgeeks.org/how-to-write-a-pseudo-code/

a) Pseudo code, as the name suggests, is a false code or a representation of code which can be understood by even a layman with some school level programming knowledge. 

b) Algorithms are expressed using natural verbal but somewhat technical annotations. 

c) Pseudo code: It’s simply an implementation of an algorithm in the form of annotations and informative text written in plain English. It has no syntax like any of the programming language and thus can’t be compiled or interpreted by the computer. 

d)  Don’t make the pseudo code abstract. 

e) Use standard programming structures such as ‘if-then’, ‘for’, ‘while’, ‘cases’ the way we use it in programming. 

f) Don’t write the pseudo code in a complete programmatic manner. It is necessary to be simple to understand even for a layman or client, hence don’t incorporate too many technical terms.

g) Use appropriate sentence casings, such as CamelCase for methods, upper case for constants and lower case for variables.


002) Snake Case VS Camel Case VS Pascal Case VS Kebab Case – What's the Difference Between Casings? ...

https://www.freecodecamp.org/news/snake-case-vs-camel-case-vs-pascal-case-vs-kebab-case-whats-the-difference/

003) Pseudocode Examples >>> 

  https://www.unf.edu/~broggio/cop2221/2221pseu.htm 

  Some Keywords That Should be Used ... 

A) For looping and selection, The keywords that are to be used include Do While...EndDo; Do Until...Enddo; Case...EndCase; If...Endif; Call ... with (parameters); Call; Return ....; Return; When; Always use scope terminators for loops and iteration.

B) As verbs, use the words Generate, Compute, Process, etc. Words such as set, reset, increment, compute, calculate, add, sum, multiply, ... print, display, input, output, edit, test , etc. with careful indentation tend to foster desirable pseudocode.


C) Do not include data declarations in your pseudocode.

004) Pseudocode: What It Is and How to Write It

https://builtin.com/data-science/pseudocode 

HOW TO WRITE PSEUDOCODE

  1. Always capitalize the initial word (often one of the main six constructs).
  2. Make only one statement per line.
  3. Indent to show hierarchy, improve readability, and show nested constructs.
  4. Always end multi-line sections using any of the END keywords (ENDIF, ENDWHILE, etc.).
  5. Keep your statements programming language independent.
  6. Use the naming domain of the problem, not that of the implementation. For instance: “Append the last name to the first name” instead of “name = first+ last.”
  7. Keep it simple, concise and readable.

 005) Pseudocode Basics 

006) Writing Good Pseudocode 

007) Creating an Example Pseudocode Document 

008) Loops in Pseudocode ... https://pseudoeditor.com/guides/loops-and-iteration 

A) Basics:

There are 3 main types of loops in pseudocode, Do loops, While loops, and For loops.

Loops are also known as iteration, meaning the repetition of a block of code. 

B) For loops are used when you know how many times you want to repeat a certain block of code. This is known as definite iteration. This can be very helpful with outputs and inputs in the program!

009) online pseudocode editor ...

A) pseudoeditor ... https://pseudoeditor.com/ 

B) Deepjain ...  https://pseudocode.deepjain.com/ 



 ┌───── •✧✧• ─────┐
Flow Chart
└───── •✧✧• ─────┘



YT: flowchart to print even numbers

YT: 

No comments:

Post a Comment