From the course: Programming Foundations: Fundamentals

Challenge: Favorite cities - Python Tutorial

From the course: Programming Foundations: Fundamentals

Challenge: Favorite cities

(upbeat music) - What's your favorite city? Mine is Santa Barbara, California. I love the food and the amazing landscapes. As you drive through the city, you can see both the mountains and the ocean at the same time. I just love it. So for our final challenge, I'd like you to create a program that prints out the name of your favorite cities, but here's the catch, you need to use at least one function. Your program should meet the following requirements, has a function named favorite_city, favorite_city should have one parameter, name, you should call favorite_city at least three times, the output should include one of my favorite cities is. Remember to have fun and try your best. In the solution video, I'll share how I tackled the problem.

Contents