1 / 14

Section 1 Introduction

Section 1 Introduction. National 4/5 VB Course. What you should know after this lesson. What is a program Who writes programs Why is sequence important in programs. Programming. A program is a list of instructions that tell the computer what to do. A programmer writes the programs

trula
Download Presentation

Section 1 Introduction

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. Section 1Introduction National 4/5 VB Course

  2. What you should know after this lesson • What is a program • Who writes programs • Why is sequence important in programs

  3. Programming • A program is a list of instructions that tell the computer what to do. • A programmer writes the programs • A user uses the programs You will be both programmer and user in this topic.

  4. What is VB • Visual Basic (VB) is a programming language that derived from BASIC – a general purpose programming language for beginners. Beginners All Purpose Symbolic Instruction Code. It’s aim was to create code to solve general types of problems.

  5. Getting Started – Sample Program Launch VB • We want to try running a VB program. • Drag the Sample folder from the PupilArea > Computing > Comp Science > VB folder into your VB folder • From the folder double click Sample.vbp (icon with the red line) and press run ► • Experiment with the program, what can it do?

  6. Sample Program • The sample program uses code to make objects visible/invisible • Has a This is how we join the program blocks together, you can unsnap a single or bunch of blocks by dragging them.

  7. Drawing • If we keep double clicking on the blocks you should notice the cat moves in a circular fashion. • Drag the “pen down” block from the pen tab, to the top of the program What happens when you keep double clicking it?

  8. Drawing a square • I don’t want to double click the block every time to draw a side of the square, I would rather double click it once and have it draw the square for me. • How can I change the program to make this happen? Hint on next page

  9. Drawing a Square 100 90 90 100 100 90 90 100

  10. Tasks • Create a program to draw a square. • Copy the diagram from the previous slide into your jotter. • Write the program to draw a square into your jotter.

  11. Adding a new Sprite • Sometimes it is nice to have more than one sprite on the screen. • Get a new surprise sprite • Write a program to draw a triangle using the new sprite. • Hint: the angle is 120

  12. All at once • Wouldn’t be easier if there was a start button? • Well there is go to the control tab and drag “when flag clicked” to the top of each of your sprite’s program. • Now when you click on the flag (top right) your program will run

  13. Review Question Write the question & answers in your jotter • What is a program? • Who writes programs? • Why is sequence important in programs?

  14. Extension Tasks Modify your program to draw the following shapes • A hexagon • A pentagon • A circle • A star

More Related