From the course: Transition from C# to Python
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Defining and calling functions
From the course: Transition from C# to Python
Defining and calling functions
- [Instructor] Functions are a pretty core part of just about every programming language and Python is no exception. And in this chapter we're going to examine different aspects of Python functions, beginning with how they are defined. It seems like a pretty good place to start. So here in chapter two, going to open up the FunctionsCS folder and the Program.cs file. So here I have a C# file with some functions defined. If we scroll down a little bit, you'll see them here. We've got regular function, one called NamedParameters and so on. And what we're going to do is build the Python equivalent of each of these functions. So let's go ahead and open up the Python version of this as well. So I'm going to open up the functions_start file. And we're going to start by learning how to define functions that we've seen a little bit of this already in the course previously but now we're going to cover it more in depth. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.