Programming Constructs (OCR GCSE Computer Science): Quizzes

📚Quizzes
Programming Constructs
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

12 questions from this quiz

Show

What are the three basic programming constructs?

Sequence, selection, iteration

What does sequence refer to in programming?

Executing instructions in order written

Why is sequence considered the foundation for all other constructs?

It is used in every program

What does selection allow a program to do?

Choose paths based on a condition

Which statements are used for selection?

if, elif, and else

In the age example, what condition determines if someone is an adult?

age >= 18

What does iteration involve?

Repeating a block of code multiple times

What are the two main types of loops in programming?

Count-controlled and condition-controlled

When should you use a count-controlled loop?

When you know how many times to repeat

In the example 'for i in range(5)', what values does i take?

0, 1, 2, 3, 4

When should you use a condition-controlled loop?

When you don't know how many times to run

What is an infinite loop?

A loop that never stops

Explore OCR GCSE Computer Science Revision Notes by Topics

Explore OCR GCSE Computer Science Model Answers by Topics

Explore OCR GCSE Computer Science Flashcards by Topics

Explore OCR GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.