Parameters and Returns Flashcards

1️⃣ Familiarise yourself with the flashcards:

  • Look through all the flashcards to see what's on both sides.
  • Make sure you understand the information on each card. If something's unclear, click the link to the revision notes at the bottom of the page for more details.

2️⃣ Test yourself:

  • Look at the question or prompt on each card and try to remember the answer before flipping it over.
  • Check the answer and make a note of any cards you find challenging and need to go over more.

3️⃣ Consistently Review and Practice:

  • Use spaced repetition: spend more time on the cards you struggle with and go over them more often.
  • Regularly review all the flashcards to help you better understand and retain the information over time.

Note: We may include questions that have multiple correct answers. It's useful to remember specific examples to understand these concepts better.

PERSONALISED 1-TO-1 TUTORING

Need more help on this topic? Get 1-to-1 support

Get support with clear explanations, practice and feedback (Ages 5 to 16).

  • DBS-checked tutors
  • Flexible times
  • Parents can be updated

Want an ad-free experience? Subscribe to remove ads

What is a parameter in a subroutine?

A named input that holds a value sent in when the subroutine is called.

What is an argument in a function call?

The actual value you pass to a parameter when you call the subroutine.

How is a function different from a procedure?

A function returns a value; a procedure does not return a value.

What is a return value?

The value a function sends back to the code that called it.

Why do we use parameters?

To pass data in so the subroutine can work with different inputs.

What does the return statement do in a function?

It ends the function and sends a value back to the caller.

Can a subroutine have zero, one, or many parameters?

Yes. It can have none, one, or more than one.

Why does the order of arguments matter?

Each argument is matched to a parameter by position. The wrong order can change the result.

What happens if you pass the wrong number of arguments?

The program will usually give an error and may not run.

How many values does a function return?

One value.

How do you use a function's return value?

Store it in a variable or use it in a calculation.

Can a procedure have parameters even if it returns nothing?

Yes. Procedures can take parameters but do not return a value.