18: Parameters in python

Extend it:

Parameters: Adapt and reuse sections of your code

For this challenge you will need to define and call some of your own procedures or functions that use parameters

Challenges:

 
  1. Define your own sub program with 1 parameter

    Hint: Use def to define your sub program. It can be a procedure or function

  2. Define your own sub program with 2 parameters

    Hint: In a sub program definition, the parameters need to be surrounded by brackets and separated by commas

  3. Define your own sub program with 3 parameters

    Hint: Hopefully you can think of a creative use for your sub program (e.g. draw 

Leave a Reply

Your email address will not be published. Required fields are marked *