Intro

In the Functions section of the workshop we wrote a simple function to use the Amazon Translate service with hard coded values inside the actual function.

The problem with this is that it is not flexible or reusable. To make our function flexible and reusable we need to be able to pass values to the function at the time it is called by the program.

In the previous section SourceLanguageCode is an example of a parameter. Which is something the function needs to perform the action required.

The value we assigned en is an example of an argument, which is a piece of information to the function so it can perform the designed action.

Looking at the Boto3 documentation for translate_text() some of the parameters were [Required] and others were optional.

In this next lab we are going to remove the hard coded values and instead use arguments.