1 / 20

Algorithms & Pseudocode & Flowcharts

Algorithms & Pseudocode & Flowcharts. Dr. Nouf Aljaffan naljaffan@ksu.edu.sa. Objectives. Learn how to write an algorithm using Flowchart and Pseudocode. Stages in Program Development Process. (2) Create the algorithm.

cost
Download Presentation

Algorithms & Pseudocode & Flowcharts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algorithms & Pseudocode & Flowcharts Dr. Nouf Aljaffan naljaffan@ksu.edu.sa

  2. Objectives Learn how to write an algorithm using Flowchart and Pseudocode Nouf Aljaffan (C) 2018

  3. Stages in Program Development Process Nouf Aljaffan (C) 2018

  4. (2) Create the algorithm • Plan for solution and use basic statements and expression to develop the algorithm Nouf Aljaffan (C) 2018

  5. Computational Thinking https://youtu.be/mUXo-S7gzds Nouf Aljaffan (C) 2018

  6. Computational Thinking • Decomposition •  Breaking down data, processes, or problems into smaller, manageable parts • Pattern Recognition • Observing patterns, trends, and regularities in data • Abstraction • Identifying the general principles that generate these patterns • Algorithm Design •  Developing the step by step instructions for solving this and similar problems Nouf Aljaffan (C) 2018

  7. What Can a Program Do? Nouf Aljaffan (C) 2018

  8. Entry Test condition p false true “false” statement a “true” statement a Exit Iterate or Loop Sequence Compare and branch No Nouf Aljaffan (C) 2018

  9. Planning the Solution Nouf Aljaffan (C) 2018

  10. Planning the Solution Nouf Aljaffan (C) 2018

  11. Example 1Sequence Nouf Aljaffan (C) 2018

  12. Example 2Compare and branch Flowchart Pseudocode Nouf Aljaffan (C) 2018

  13. Example 3Iterate or Loop Flowchart Pseudocode start End Nouf Aljaffan (C) 2018

  14. Example 4Calling predefined processor Nouf Aljaffan (C) 2018

  15. Exercise 1 Write an algorithm to find the perimeter of triangle Nouf Aljaffan (C) 2018

  16. Exercise 2 Nouf Aljaffan (C) 2018

  17. Exercise 3 • ABC company plans to give a 6% year-end bonus to each of its employees earning Rs 6,000 or more per month , and a fixed Rs 250 bonus to the remaining employees. Write an algorithm to calculate the bonus for an employee Nouf Aljaffan (C) 2018

  18. Conclusion • The flowchart and the pseudocode were explained • There are many styles of pseudocode. • Flowchart could be time-consuming but a good tool in education. Nouf Aljaffan (C) 2018

  19. Question! Nouf Aljaffan (C) 2018

  20. References • https://computationalthinkingcourse.withgoogle.com/unit Nouf Aljaffan (C) 2018

More Related