In the first slide, we write def which means to define a function so we are defining a function called hotel_cost(nights) and then we add a return statement (140 * nights). Going on to the next slide, we add if statements, else statement and also return statement. There is also a def statement and it has the plane_ride_cost() and in the parentheses is city. Within different if and else statements contains a place and the return statements contains the value which would be the prices for the variable city. We would do the same string, but instead of plane_ride_cost() it will be rental_car_cost() and within it will be day. and under it would be the cost = days * 40.
This is the first post on your Learning Blog. Edit or delete it, then start blogging!
The ePortfolio is both a Learning Blog and an Academic Career Portfolio. Use the Learning Blog to document your learning experiences and class assignments each semester. As time goes by, add content to the Academics and Career sections to show your department, graduate institutions, or future employers how well prepared you are for your chosen career.
NOTE: Remember to add appropriate Categories and Tags to your posts. This will help your professors and other visitors find the content they are looking for. The Categories “Coursework” and “Field Trips” and the Tags “OpenLab” and “City Tech” have already been applied to this post. Feel free to make changes!