All posts by Mr Stratton

Computing teacher and a PT at Coltness High School.

Nested Fixed Loops

A nested fixed loop is a loop within a loop, that is iterated a fixed number of times.

This is written in pseudocode like this

  • For X = 1 to 10
    • For Y = 1 to 10
      • Display X & Y
    • Next Y
  • Next X

The program above will display

  • 1 1
  • 1 2
  • 1 3
  • ..
  • 2 1
  • 2 2
  • 2 3
  • ..
  • ..
  • 10 1
  • 10 2
  • 10 3
  • ..

Create the following programs

  1. Display a triangle of stars
  2. Display the first 10 times tables
  3. Display a number grid of the first 10 times tables

Continue reading Nested Fixed Loops

Analysis – Input, Process, Output

Here are some fairly simple programs that will help you with the sequencing of programs.

Remember, Analysis will tell you

  • What the program needs to work (Input)
  • What the program needs to do (Process)
  • What the program will produce (Output)

Use Dia to design the programs below then implement them in VB2008EE

  1. Adds two numbers together and display the answer
  2. Multiplies two numbers together
  3. Calculates the area of a square field
  4. Calculates the area of a rectangular field
  5. Calculates the perimeter of a rectangular field
  6. Calculates the length of wire required to put a three stand fence round a rectangular field
  7. Calculates the volume of a cube, when the length is entered by the user (must use ^). Display the total surface area and volume of the cube.

ADITDEM

Today’s lesson was to show you that a complex program could be broken down into smaller and easier to manage pieces. The software development unit requires and lot of thought and pupils often find it difficult to solve the task they are give. The key is understanding the problem. We use the waterfall method, where one stage leads to the next one.

  1. Analysis
  2. Design
  3. Implementation
  4. Testing
  5. Documentation
  6. Evaluation
  7. Maintenance

You can remember it as “A Dance In The Dark Every Monday”.

Remember the unit is Software Development, not programming.

Good luck

Right I am calling it a night on the chat room. Remember the exam is at 9am tomorrow!

Bring

  • Blue or Black Pen (better yet bring 2 of each)
  • Calculator (you did buy the £1 binary calculator I told you to?)
  • Ruler (you never know)
  • Correction fluid (you don’t need this, a single line will do)
  • Your books to return to me (I don’t need the notes)

Remember

  • Check that you have the right paper in front of you and listen for any special instructions.
  • Look at the marks for each question, 2 mark questions require 2 distinct points.
  • Answer fully and in sentences.
  • Leave gaps if you need to come back to a question, leave gaps between questions in case you want to write more later.
  • Don’t leave early, you have nothing more important to do. You can’t add the one mark answer that passes the paper, if you are sitting in McDonald’s.
  • Take your time, think if I would be happy with the answer, add examples to clarify your points.

Feel free to come round to my room afterwards to discuss the paper.