1 / 7

Computer Programming

Computer Programming. Important concepts. Looping (repeat statement) Named procedures Parameter passing Now we will use these ideas in a more complex problem. Looping, procedures, parameter passing. Consider what procedures you might find useful by trying to identify the repeating patterns

latham
Download Presentation

Computer Programming

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. Computer Programming

  2. Important concepts • Looping (repeat statement) • Named procedures • Parameter passing • Now we will use these ideas in a more complex problem

  3. Looping, procedures,parameter passing • Consider what procedures you might find useful by trying to identify the repeating patterns • How can you use parameter passing to vary the size of the chess board?

  4. Google Sites • Create site • Blank template • URL = username_cp • Make Logo page • Create three subpages: • looping • parameter passing • procedures • An image • Some code • Some explanatory text

  5. More complex patterns Useful commands: • setpencolor [rrr ggg bbb] • setfloodcolor [rrr ggg bbb] • fill

  6. Quick quiz coming up Next TuesdayAdd to yourcalendar • REPEAT statement • Creating subprocedures • Passing parameters • Knowledge and Understanding • Reading and interpreting code • Application • Writing code • Communication • Defining terms, explaining approach and concepts, etc

  7. Examples • The following Logo commands create the shape shown but some of the commands are missing. Write down the missing commands. [5 marks] • fd 100 • rt 90 • fd 50 • … • fd 100 • lt 90 • fd 150 Define the term procedure. [1 mark] Give two advantages of using procedures in computer programming. [2 marks] Write code to draw the following pattern in Logo. You will gain points for correct code and for using a sensible approach.[6 marks] Write a logo procedure triangle to make an equilateral triangle. The side length of the triangle should be passed to the procedure as a parameter. [3 marks]

More Related