Computer Science - 9210 OxfordAQA

Programming Concepts

Overview

There is a startling fact hidden in this topic. Every program ever written, from a twenty-line homework exercise to the software flying an aircraft, is built out of three ways of combining statements and nothing else. Do this, then do that. Do this only if something is true. Do this again and again. Sequence, selection and iteration. Everything else is decoration on top of those three.

This lesson takes each of them apart. You will meet variable and constant declaration and learn why a program bothers to name things at all; you will learn assignment properly, including why the left-hand side and the right-hand side of an arrow are not interchangeable; you will learn definite iteration and both shapes of indefinite iteration, with the condition at the start of the iterative structure and with it at the end; you will nest selection inside selection and iteration inside iteration; and you will find out why an examiner cares what you call your variables.

Objectives

  1. Use, understand and know how the following statement types can be combined in programs:
  2. variable declaration
  3. constant declaration
  4. assignment
  5. iteration
  6. selection
  7. subroutine (procedure/function).
  8. Use definite and indefinite iteration, including indefinite iteration with the condition(s) at the start or the end of the iterative structure.
  9. Use nested selection and nested iteration structures. An example of nested iteration would be:
  10. Use meaningful identifier names and know why it is important to use them.

Mind map

This topic is mapped out so you can see how the ideas connect.

Open the mind map in the app

Lesson Note

A statement is one instruction in a program. On its own a statement does very little; the power comes from how statements are combined. The specification puts it plainly: the three combining principles, sequence, iteration or repetition, and selection or choice, are basic to all imperative programming languages. Imperative means a language built out of commands that change the state of the machine, which covers C#, Python 3 and Visual Basic and very nearly everything else you are likely to meet.

Complete Note Available on the Green Bridge App

Get the Green Bridge CBT app on your phone or computer for the complete IGCSE library: past papers, mark schemes, mind maps, flashcards and audio lessons.

Full lesson notes with diagrams
AI-powered learning assistant
Timed mock exams marked the moment you finish
Available on Android, Windows, macOS, and Linux iOS app coming soon

Lesson Evaluation

Congratulations on completing the lesson on Programming Concepts. Now that youve explored the key concepts and ideas, its time to put your knowledge to the test. This section offers a variety of practice questions designed to reinforce your understanding and help you gauge your grasp of the material.

You will encounter a mix of question types, including multiple-choice questions, short answer questions, and essay questions. Each question is thoughtfully crafted to assess different aspects of your knowledge and critical thinking skills.

Use this evaluation section as an opportunity to reinforce your understanding of the topic and to identify any areas where you may need additional study. Don't be discouraged by any challenges you encounter; instead, view them as opportunities for growth and improvement.

  1. Which three principles are used to combine statements in all imperative programming languages? A. Assignment, declaration and output B. Compilation, interpretation and assembly C. Sequence, selection and iteration D. Variables, constants and subroutines Answer: C
  2. Which construct is used for definite iteration? A. FOR ... ENDFOR B. IF ... ENDIF C. REPEAT ... UNTIL D. WHILE ... ENDWHILE Answer: A
  3. Which statement about a REPEAT ... UNTIL loop is correct? A. Its body always runs at least once B. Its body may run zero times C. It runs a number of times known before it starts D. It cannot contain another loop Answer: A
  4. A FOR loop that runs 6 times contains a FOR loop that runs 5 times. How many times is a statement in the inner loop carried out? A. 11 B. 20 C. 30 D. 36 Answer: C
  5. Why are named constants used in programs? A. They make the program run faster B. They let a fixed value be changed in one place and cannot be altered by later code C. They use less memory than variables D. They are required by every programming language Answer: B

Work through these questions in the app

Work through these questions in the app

Practice Mock Questions

Want to practice mock questions on Programming Concepts? Download the Green Bridge CBT app to access mock questions and full practice assessments for this topic.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning