What is Pseudocode? • Simple way to write program logic using plain English • Not actual code – no syntax rules • Helps in planning before coding
Why Do We Use Pseudocode? • Helps plan and organize logic before coding • Easier to understand and write • Acts like Google Maps for your program • Example: Making Maggi – Step by step instructions = pseudocode!
Advantages of Pseudocode • Easy to write and understand • No syntax errors • Helps in teamwork and collaboration • Improves logic building skills
Disadvantages of Pseudocode • Cannot be run directly on computer • No standard rules – varies from person to person • Needs to be converted to code manually
Common Keywords Used in Pseudocode • START, END, READ, DISPLAY • IF, ELSE, FOR, WHILE, REPEAT, UNTIL • MOD, SET, INPUT, OUTPUT
Example 1 – Add Two Numbers • Pseudocode: • READ A, B • SET SUM = A + B • DISPLAY SUM • • C Code: • int A, B, SUM; • scanf("%d%d", &A, &B); • SUM = A + B; • printf("%d", SUM);
Example 2 – Check Even or Odd • Pseudocode: • READ N • IF N MOD 2 == 0 THEN • DISPLAY 'Even' • ELSE • DISPLAY 'Odd' • • C Code: • int N; • scanf("%d", &N); • if (N % 2 == 0) printf("Even"); • else printf("Odd");
Pseudocode vs Flowchart • Both are tools to plan logic • Pseudocode = Text-based steps • Flowchart = Visual diagram with symbols • Use what suits your brain better! Start Check N MOD 2 == 0? Even? Display Even Display Odd
Where is Pseudocode Used? • In interviews to explain logic without code • By teams to discuss program logic • In exams where logic matters more than syntax • Before writing big programs
Conclusion • Pseudocode is a bridge between human thinking and real code • Helps plan, explain, and write programs better • Once you master pseudocode, coding becomes easier!
Thank You • Presented by: Vivek • Topic: Pseudocode