- [Instructor] Most applications,…regardless of the programming language…they are written in,…are broken up into smaller blocks known as functions,…and Python is no different.…In this example,…we're going to take a look at how to work with functions…in Python.…In the editor, open up functions_start.py.…So let's start by defining a function.…So functions are defined with the def keyword,…and I'll call my function, function 1,…and then open close parens.…
Now this function doesn't take any arguments,…but we'll get to that in a little bit.…And then a colon, which indicates the start…of the function scope block,…and then when I hit return,…you'll notice that the next line is indented,…so I'll write print,…and then inside there I'll give it a string,…I am a function.…Alright, so a couple things to notice here.…In some cases, in other programming languages,…this colon will be replaced in say Java or C…with curly braces to indicate scope.…
That's not how Python works.…Python uses a colon, and then the next line is indented,…
- Installing Python
- Choosing an editor or IDE
- Working with variables and expressions
- Writing loops
- Using the date, time, and datetime classes
- Reading and writing files
- Fetching internet data
- Parsing and processing HTML
Skill Level Beginner
1. Getting Started
2. Python Basics
3. Working with Dates and Time
4. Working with Files
5. Working with Web Data
- 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.