Taking a Vacation

For this assignment, I use the website called Codecademy to calculate the cost for my vacation. I use functions to complete this assignment. In the context of programming, a function is a named sequence of statements that performs a computation. This assignment was a little bit difficult to complete because some of the instructions are confusing, but I was able to complete the assignment and know the total cost for my vacation.

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-1_12_43-pm

When you define a function you specify the name and the sequence of statements.

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-1_14_07-pm

Functions are invoked by their name.

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-1_14_26-pm

Calculating the hotel cost, plane ride cost, and car rental,

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-1_14_48-pm

Calculating the hotel cost, plane ride cost, and car rental,

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-1_15_15-pm

Calculating the hotel cost, plane ride cost, and car rental,

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-1_15_32-pm

Finally, I was able to calculate the total.

taking-a-vacation-_-codecademy-google-chrome-9_20_2016-3_20_54-pm