Lab #2

1. Before We Begin – This is a quick review and familiarizing about using functions. I had to create my own function.

Screenshot (31)

 

 

 

 

 

2. Planning Your Trip – Here we would start to calculate the cost of the trip. First is the cost of the hotel by making it as a function. We would multiply 140 by the number of nights because each day at the hotel is $140 as the return value. Screenshot (32)

 

 

 

 

3. Getting There – For this trip there is a plane ride we have to calculate for. We are going to have to make another function for the plane ride cost.  There are different cost of the plane rides depending on the location.Screenshot (33)

 

 

 

 

4. Transportation – For this trip we are going to need to rent a car so we have to create a function for this as well. And see how both of the discounts work.Screenshot (34)

5. Pull It Together – So now that we have the cost for the hotel, the car rental, and plane ride we need to find the sum. So we will make into a function adding them all up.

Screenshot (35)

6. Hey, You Never Know! – We do have a function having the sum of the cost of the trip but there something else we need to add. Since this is a vacation there will obviously be spending money to take in to account.

Screenshot (36)

7. Plan Your Trip! – Now we make a trip. I printed the location for the plane ride, how long we are going to stay and the amount of spending money.

Screenshot (37)