Using subprograms (Edexcel GCSE Computer Science): Flashcards

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

Practise the cards

12 cards from this deck

Show

What is a subprogram?

Self-contained code block that performs a specific task within a larger program

Subprogram reusability

Written once, used many times in same or other programs

What are built-in functions?

Functions already part of the programming language

Example of built-in function

print() or len()

What are library functions?

Functions that need to be imported before use

Example of library function

random.randint() or math.floor()

User-defined subprograms

Custom subprograms created for specific needs

What is abstraction in subprograms?

Using a subprogram without knowing how it works inside

Generalisation in subprograms

Making subprograms work with different input values

Purpose of parameter passing

Enables generalisation by sending different values

Subprogram benefit: complexity

Breaks large programs into smaller manageable chunks

Subprogram benefit: maintenance

Fix code in one place, not throughout entire program

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

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