Close
Close full mode
logoMakeCode AP CSP

Student Tasks/Solutions

Tasks

Student Task #1: Return Values Task 1

Task 1 Challenge: Return Values Task 1 Challenge

Task 2 Challenge: Return Values Task 2 Challenge

Task 3: Solutions will vary

Reflection

  1. What needs to be added to a function so that it will return a value?
    • A Return block
  2. If a function returns a value in one case, does it need to return a value in all cases?
    • No functions don't have to return a value.
    • But if a function does have a Return block, then it will always return a value.
  3. What happens if you call a function with a return value without storing or using the returned value?
    • Nothing happens
  4. Where might return values be used in your previous projects?
    • Decisions, Change by Five programs

Homework

Complete the problem set at Problem Set: Returns:

πŸ“˜ Unit 5 - AAP Part 2 β€” Previous
Writing Functions with Return Values
Next β€” πŸ“˜ Unit 5 - AAP Part 2
Day 4