Taking a Vacation

Hey so this was a assigment give to us by my professor to comepetel at home. This Lab was not to hard and gave me a chanellege in to what a function really does in python. Python is a computer program used to write code and give computers task and dierctions along with inscrutions so it can compelete different taks.

On this excerise asigned we were asked to so how a function can be used to plan a trip and add up the sums and expenisves of each trip.

Screenshot 2016-02-18 15.08.41

As shown in the picture above we can see the function i used to def the trip. first i was aksed to define the hotel cost of the trip and how much each city would cost. i have each city a return value and that would tell the program to show the value is asked on which city i wanted to vist.

This image shows that i didnt inpuit the correct code in order to pass on to the next page. as we can see the mistake is very simple to the eye but very easy to do. I forgot to take out the return input for the quatations they where not suppose to be in quotations becuase this is not a comment but the value i want to show up in the result.Screenshot 2016-02-18 15.09.51

this here is the final product of the code

Screenshot 2016-02-18 15.16.48

Now we come to the last part of the Lab and i begin to understadn more and more about defining functions and the Print and Return The IFs and Else OR the ELIFs these inputs all have a reason to be put in to the code they give the action of what to do or show. In each variable. Screenshot 2016-02-18 15.39.06