Subprograms (Edexcel GCSE Computer Science): Flashcards

📚Flashcards
Subprograms
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

15 cards from this deck

Show

What is a subprogram?

A self-contained sequence of instructions that performs a specific task

Main benefit of subprograms

Avoid code repetition, improve organization and readability

Two types of subprograms

Functions and procedures

What does a function do?

Performs work and returns a value

What does a procedure do?

Performs an action but doesn't return a value

Definition of arguments

Actual values sent to a subprogram when calling it

Definition of parameters

Labeled boxes that receive and store values in subprograms

What are built-in subprograms?

Ready-to-use functions/procedures available without setup

What does input() return?

Always returns a string

Is print() a function or procedure?

Procedure (doesn't return a value)

What does len() return?

Returns an integer (count of items)

What does float() do?

Converts text or integers into decimal numbers

Purpose of import keyword

To use library subprograms/modules in your code

What does math.floor() do?

Returns largest whole number \leq the decimal

What does math.ceil() do?

Returns smallest whole number \geq the decimal

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

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