1 / 11

Program Design Tutorial #1

Program Design Tutorial #1. What is an Algorithm?. An algorithm is a well-developed, organized approach to solving a complex problem. Algorithms. Examples of algorithms include Musical scores. Algorithms. Examples of algorithms include Knitting patterns . Algorithms.

heaton
Download Presentation

Program Design Tutorial #1

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. Program DesignTutorial #1

  2. What is an Algorithm? • An algorithm is a well-developed, organized approach to solving a complex problem.

  3. Algorithms • Examples of algorithms include • Musical scores

  4. Algorithms • Examples of algorithms include • Knitting patterns

  5. Algorithms • Examples of algorithms include • Recipes

  6. Here's the algorithm – follow exactly!! • Draw a diagonal line • Draw another diagonal line connected to the top of the first one • Draw a straight line from the point where the diagonal lines meet • Draw a horizontal line over the straight line • At the bottom of the straight line, draw a curvy line • Draw a diagonal line from the bottom of the first diagonal to the straight line • Draw a diagonal line from the bottom of the second diagonal to the straight line

  7. How did the pictures turn out? • Compare your picture with others' pictures… • Were they different? • Why? • What was difficult about following the instructions • What was missing from the instructions?

  8. It was meant to be a kite!! • Draw a diagonal line • Draw another diagonal line connected to the top of the first one • Draw a straight line from the point where the diagonal lines meet • Draw a horizontal line over the straight line • At the bottom of the straight line, draw a curvy line • Draw a diagonal line from the bottom of the first diagonal to the straight line • Draw a diagonal line from the bottom of the second diagonal to the straight line

  9. Exercise #1 • Now write a set of instructions that work! • Ensure only one way to interpret each step • unambiguous • … and enough detail in each step • About 10 steps

  10. Exercise #2 • Now draw a shape on paper, but not a HOUSE or a PLANE, too obvious! • Write the algorithm • Write a set of instructions that explains how to make a paper shape from 1 sheet of A4 paper • Test it • Try out your algorithm with someone else – does it work? • Note: follow your instructions as closely as possible • Adjust the instructions if necessary …

  11. At the end of the tutorial • You will have two sets of instructions, one on how to draw a kite, the second on how to draw another object. • In the same Word document you have with all your labs: • PROGRAM-DESIGN-PORTFOLIO.DOCX • add in the two sets of instructions, one on how to draw a kite, the second on how to draw another object. • e-mail your document to Damian.Gordon@dit.ie with a subject heading of PROGRAM DESIGN TUTORIAL #1 and in the message of your e-mail please let me know your full name, your student number, the name of your programme, the programme code, the name of the module, the year you are in (first year), and your assignment. …

More Related