Make use of functions to share your favorite cities in the course's final challenge exercise.
(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.
- Writing source code
- Basic statements and expressions
- Working with numbers and strings
- Writing conditional code
- Increasing your efficiency with functions
- Working with comments
- Making decisions in code
- Troubleshooting errors
- Learning about other languages
Skill Level Beginner
Programming Foundations: Fuzzy Logicwith Erin Colvin41m 50s Intermediate
Programming Foundations: Algorithmswith Joe Marini1h 45m Beginner
Programming Foundations: Design Patternswith Elisabeth Robson1h 44m Intermediate
1. Programming Basics
2. Programming Syntax
3. Variables and Data Types
4. Conditional Code
5. Modular Code
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.