Beginning Software Development with Python | Kamil S. Kom | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Beginning Software Development with Python

teacher avatar Kamil S. Kom

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

18 Lessons (1h 24m)
    • 1. 01 Intro

    • 2. 02 Installation

    • 3. 03 Variables

    • 4. 04 Identifiers

    • 5. 05 Jupyter Notebook

    • 6. 06 Other Python Environment

    • 7. 07 Functions

    • 8. 08 Code Blocks

    • 9. 09 Function 2

    • 10. 10 Modules

    • 11. 11 Class

    • 12. 12 Conditionals

    • 13. 13 Comment And Documentation

    • 14. 14 Container

    • 15. 15 Container 2

    • 16. 16 Number

    • 17. 17 Boolean

    • 18. 18 String

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Many companies are looking for programmers to increase the efficiency of their business using information technology. But what this companies after are competent programmers. Those who can create software that solves their problem efficiently. For every successful IT project, there are a lot more projects that are canceled because they went over budget or hopelessly late, and you don't want to be in this camp.

Creating good software takes more than just knowing the features of your programming language, but more importantly, how to use them to solve real-world problems. Python is a very easy to learn programming language, but you still need to learn how to use it effectively.


In this course you will learn:

  • How to breakdown real-world requirements and implement them with function, class, and module

  • How to write a good documentation

  • How to combine many simple components into a more complex program

    You won't learn the latest frameworks in python, instead, this course is focusing on creating a rock solid foundation for software development skill.

    When you roll in this course you will also receive all the supplementary materials like the notebooks and source code used in the lectures.

Meet Your Teacher

Teacher Profile Image

Kamil S. Kom


Kamil has many years of experience developing software for banks, auto companies, power plant companies, and the Indonesian Stock Exchange.

During his career, he has done programming in many areas. Graphics programming using DirectX and OpenGL, database programming with SQL, scripting with Python, web development and mobile programming for iOS, Android, Blackberry and Windows Phone.

Kamil has a bachelor degree in information technology from Sepuluh November Institute of Technology

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. 01 Intro: we will come to my course beginnings of a development with Fife in. I deliberately choose to them suffer development because in the scores, you know Alan had to go in python. But also the process off developing a professional software Developing software is an interactive process. You may have a clearly seven. What kind off? Some very you want to develop initially, but as the development process goes, that will be a lot of changes you might realize and you designed that better serve your purpose. Maybe there are changes to the initial girls. Maybe there are changes to the environment where your program will run. These are the everyday realities off summer development. To deal with this constantly changing environment. It is not enough. In our good runs, it also must have a good structure. Learning to write aware structure coat is not easy. So in this course, I won't bombard me with a list off life and be sure that you must learn. Instead, I will start with a simple case in gradually falls within the more complex case and you will learn about life in features. Have you have you tackle this increasingly complex case? You learn not only how to do things in life in, but also why you're doing them becoming a good suffered ifl apart. It's not something that can happen overnight, but that's all the mothers in the study right now. 2. 02 Installation: Okay, let's start with installing Fife in. There are lots of python distributions, but for the scores are using Anaconda. You can get it from Anaconda that come anacondas installers for Windows, Mac OS and Lennox, So download installer that match your operating system. For this course, I'll be using Windows Big Consulted with the latest wife infection, you can choose to insult 64 bit installer. Artful team to Beat installer. If your operating system is 64 bit, you can install the 64 with installer out of the 32 bit installer. But if you're opening system is 32 bit, you can only install the 32 bit installer in windows. If you want to know whether your windows is 32 bit, part of a 64 bit just open Explorer, right click on this PC. Click properties and you'll see what type your windows is. I'll be using the 64 bit installer. Just click the link to download it safe and wait for the Dunder to complete. Okay, we'll run the installer. Just your story for options. Feel free to chase the installation location, but I'll stick with the default with for the installation to finish. Okay, Now, to start Anaconda, just type anaconda in Windows Search and choose Anaconda. Problem in this course will be using Jupiter Notebook, which is a very nice programming environment that run on bro zips Ah, for digital is running. Click new inches Spieth in. This will create in your notebook where we'll do our coding, so let's stop. 3. 03 Variables: that is a tradition in programming. Would that for your horse program, you'll share tax in a screen that says Hello World in bison. Just read print open parenthesis called Hello World would close parenthesis and your horse program is done to run this program. Us like the run button. You can see that hello, work is displayed here. You can answer on the program by placing ship and ended. Since this is the same program, the output stays the same, but you can see that this number is increased. This number would go up every times you're in your program, clicking the run button pressing shift and enter with it on your program and move you to the next cell. If you want to run your program and stay at the current cell, just place control and enter now for our tests, like a program that says hello, the several people. Another problem, right? Let's say the people you want to say hello are common. Sarah and armor. We just need to read this. The what? Hello is used three times in our program. We can just say for it a variable. Let's call it great Variable is the storage for data. You know, case we create variable concrete that starts the text Hello. To create a variable like variable name followed by equal sign Hold by variable letter in programming would we usually call the data that are variable contains as the hell off the variable. If you print a variable the one that will be displayed This the fellow of the variable, not its name. We can bring this variable combined with our previous names by separating them with a coma . These two could have the same output. But the 2nd 1 has better structured. Why? Let's say we want to change Hello Too high then all we need to do is the just the fellow great. Too high we're using variable. We can change our whole output by making a single change the variable. But in the first coat, if you want to change on the output, you have to make three changes. And what if you actually great 100% Then you have to make 100 changes. This is a simple example of modularity. We can think of Great variable. It's a component that has a function to safe current greeting world by calling this way. We create a program that is easy to change and grow. Hurry, reverse really can change during the lifetime of a program. Let's just the fellow off, Great Back to Hello. Yes, you can see Goodfellow is high during the 1st 3 printings, but it became hello in fourth printing in bison. Hurry about it. Must have a failure. You re create a variable name call, but since we don't ascend any fairly to it, it will become an error. It says here that call is undefined because we didn't assign any Hello to call. It doesn't consider to be a fairly variable the fix this and just assigned a value to go. You can assign the fell off a variable to another variable. As you can see, Carlos really is now equal to Greece. Fell, which is Hello. Hurry about myself name. But you can just speak another with 30 name for a variable. There are rules for naming things in python, and this is a big home. Next feed you 4. 04 Identifiers: in programming. Would the name we assigned to an entity in our code is called Identify here, and that's the topic of this feed you. For now, we only need to create names for variable, but later we will learn about other Python entities that also need to be named. Creating a good name is important because a good name can show the purpose of your coat. Let's say we create Afari about the store, the grating work, but give it some nonsensical name. Light orange. The program looks the same, but people who really a program will surely wonder what you mean by combining orange and a person name. But if they see call in a person name, it is easy to the conclusion that you are calling that person. You might think that this isn't such a big deal, because it's obvious that the old Estrella is the text Hi, so foolish and a person name in saying hi to that person. But don't forget that this is just an example. Our program only consists a few lines, so it's easy to remember what every line means. But the real program can consist of hundreds, thousands, even millions runs off good. So take a good name that show what you are trying to do. Creating a good identify here is important, but in life in identify, yours must be inserting hormone. The rules are and in the four years must start with a letter or an underscore. For example, you can create affordable name person. You can also create a variable name underscore person. You can create the for uber called one person because it doesn't start with a letter or an underscore. It starts with the number You can see that we get an editor here soon. A series that hurry about that stand within underscored have special meaning in bison. We will learn about it later. So let's also it is that for now, if you want to create an identifiable just speak the name that starts with the letter. Identify your can contain letters underscores in numbers. You can use number as the first character in an identifier, but you can use it for the subsequent characters and in the fire is case sensitive. This line means that we create a new Faria biblical person, one with Capital B. This variable is different from the previous variable person one with lower kiss be, we can prevent my printing them together. We can see that they are different variables with different families. If they are the same variable, we'll have the same name printed twice. You can use QR. It's identifying key words are words that have special meaning in bison and can be used as identical you to get the list of keywords in person. You can use this good. If we try to use a key, what s an identifier will get an error. You don't have to memorize all the keywords in bison. Just remember that if you encounter an adult like this, it means that you are using a cure. This identify here. Justin should variable name to fix this good. The laying of variable name in bison is unlimited but awfully long. Names will make it hard to read or write it. A name that consists of two or three words is acceptable because many times it's hard to use a single word to describe what you're trying to do. Since you can use space, it's part of identifying where there are several styles on how to write an identifiable it consists off more than one work. Let's say we want to create a variable name current person. The first style is to write all the words in our case, but capitalize the first letter of a word starting from the 2nd 1 This style is called Camel Kiss. The second style is just like the first time, but the first letter of a word is capital I. Since the first word, this one is called Pascal Kiss. The fifth style is to write the words in lower case and separate them. If underscore this style is called Snake is. This is the start of that must often use in life in but different broken government use different signs. This three styles are the most popular styles use in programming languages, not just in bison, so make sure that you're familiar with them. In real program, you should always speak. A meaningful name is identified here, but when you write code for a practice or experiment, it's okay to pick some short, easy to write. Name is that and the fire. For example. In person, you can combine multiple Texas into a single text using the plus sign, so let's try it. It is that that when combining Texas Ng plus sign, my son will up in certain in this space between variables failure. If we want to have space, we have to end it ourselves. We read this girl just to check what's possible in bison. We didn't try to create as useful program. That's why it's OK to name the Variable S A, B and C and that song for identifier. Since we have done some Cody now stand to get more understanding about Jupiter notebook itself. We'll do that in our next video. 5. 05 Jupyter Notebook: the first thing you should know about you. Better notebook that it has two months and it must been coming with edit mode is the one where you write the code in the cell. In edit mode. The current Senate has green border. There is also a pencil I can up here. When you run your coat, you exit the ended months into coming with in coming months. The current cell has blue Burger. You can also see there is no longer any I can hear in common with. You can press each to get the least of shortcuts that available both in common month. In edit mode, you can see here that you can go to coming moved from edit mode by pressing escape. And if you are in common, what just press enter to go toe ended mode. Up until now, we just write code in Jupiter notebook, but you can also another kind of Contin. Let's add some explanation. Take in common with you can press a toe and a cell above the current cell, ready for the type of the Senate ISS. Good. You can see the type of the current cell here, and you can change the type of the Senate. If you want, little hole types available here could mark down a role and be comfort and heading. Heading is a north feature of Jupiter notebook and no longer use so we can ignore it. Grow and be comfort is an offence feature. We're not going to learn about it now. What is the type where you write your coat? Just like what we did before? My gun is the time where we had additional contents. So let's use this and we say that type of the current cell is no Mark Graham. Let's type some text when we run this. Sell it become regular Tex Markdown is a markup language like HTML, but with a simpler for month. For example, we can add hashtag before a line off checks. The market s a title and it will be rendered with a bigger form. Make sure that there is at least a space that separate the hashtag from the tax. You can read more about my gun in market town guy that or here we can see the example off. Various markdown pharma understanding markdown allow you to create attractive contents to accompany your coat, But that's beyond the scope of the scores. In this course, we were concentrating on Burning Person. One thing about you. But the notebook that is different from other person editor is the Jupiter notebook consists off cell, and it's can. We ran out of order fashion. For example, let's create a new variable in a cell and printed in another set. When you're in this same, you'll get another because you haven't done the previous cell where he created the fairy ever. If you're on the self falls, your coat with a run just fine. Another thing that should be aware is that the result off previous run is still in memory. Even if you arrest the code that create X variable, it still exists because we define it in our previous around the make sure that Juba, the notebook only Iran code that is currently written, and to make sure that the cell is run from top to bottom rest Cardinal in Choose Restaurant in John Paul. This will start the whole Juvederm notebook, and it is all the result off previous Run. This girl is now in error because you haven't run the code that created next. So let's add that the good thing about uber than a book that is automatically safe, your notebooks and a file regularly. You can say the dish, but that there is a file off our caramel book and it's currently running. Or did it look excusing the reform name, which is untitled? Let's get with a better name like Session one. Let's separate and you can see in the Dish book that the file is no using the new name. By the way, the extension off division of the file is that I buy NB withstand for interactive bison notebook since our notebook is safe. Profile if when. If we close the notebook 10 we can easily operate again by clicking the file. Jupiter Notebook is a Web publication, and, like other well complications, it's run from a Web surfer. In our case, when we rent you better notebook who have surfer is created locally in our computer. If we close the Jupiter notebook application are not going to stop functioning because there is no set for that will run the coat. Since we already say for notebook, let's close this application and see what happens. You can close the cheaper than notebook by pressing control and see, we see an entered messaging or not book pitch that says that we can connect the notebook Surfer also retains on our code anymore. To fix this just friendship with the notebook again refreshed our bitch and everything is back to normal. 6. 06 Other Python Environment: Jupiter notebook is very convenient environment, dude, according, but it's not the only Ray tickle in bison. In this video, we will learn about doing person programming outside of Jupiter. Notebook while the scores were primarily used. Jupiter Notebook you must be capable of doing bison programming in other environments. If you want to be a professional bison program, the simplest and most common way to go in life in its still write your coat in a text file and run it with bison compiler. Here I happen Attacks Editor. Not bad Plus Plus that's right. The simple Cooking it and sit with your final call. Simple, the by that by is the most common extension. But by fans are school. You're on this one. We just need to call a bison compiler, open the consul in the location and write the By Francisco file that we want to run. In our case, it's simple by, and we can see the output. One thing you should know is that Jupiter notebook. While it's not a holiday by since our school while Jupiter Notebook file contain spy things us good. It also contain other information like sell information and mark done that is not part off bison language. If you trying to run jumper notebook file with my son compiler, you'll get an error. If deer and bison regards specifying any while you're enter in the Bison Interactive share in this month, you cannot your good and it we run after you press, enter the system what I used to another and bison years ago. It's very useful to be able to just write a code and immediately get the feedback. But now you don't notebook can do the same. So there's not much of a reason to use spice and interactive shell to quit from this mud. Just that exit and parenthesis like any other skill. If you want to be good at mice and programming, you have to do a lot of practice. But sometimes, like when you're outside, you don't have access to your computer where you have set up your bison environment. In situation like this, you can use online bison compiler. Yes, search online bison compiler, and you'll find a lot of them. Let's try some of them different on land. Compiler will have different interface, but the usage is still actually identical, right? You're could and then press some button to execute it on land. Compile elicit with dual to learn about pricing rules. But if you want to write program for real, it's better to do it in your own computer. There are a lot of things that are hard or impossible to do in on an compiler. Things like installing for party libraries, accessing file in your hardly set center. But as long as you have Internet connection, you can learn bison anytime, anywhere. 7. 07 Functions: previously, we learn about variable, an entity that is used to stop data so it can be used repeatedly. No, we re learn about function. Function is an entity that is used to start codes so it can be used repeatedly in her. We already use functions many times before. That's right. Bring is a function. Brain is a built in function that is provided by bison. We can also create function of self. Previously, we had coat the Greek people. No artist is to create function like that. To create a function. You write death. Russian name open for emphasis. Lisa program it this close but and faces for Colin and the code that we want to execute. Function name is unidentified here, just like variable name parameters are variables that received their fellow from the coat outside the function. Here we have only one parameter called name that will receive the name of the person we want to greet. We have created a function entering the code inside the function. We have to call it to call a function. Just read the function name, followed by open parenthesis pulled by the arguments followed by close princesses. Arguments are the fellow get well, Buster the function in the school The text coming is the argument that we use and inside the function the perimeter name will receive Cameron S is from We can only function as many times as we want and we can pass it different fellows for the argument, like variable function is very useful to make our could be more structure if you want to change the greeting from hello too high, we just need to make a single change inside the function in a lot of change. But what if we don't really want to change our greeting from hello Too high? We want to great with Hello. Most of the times it just sometimes we want to use high escalating we can migrating into another perimeter that can be specified by the color of her coat. You have more than one parameters. You must separate them with a comma. We have the function, Scott Greed. Here in bison, you can play it function with the similar in many times, and bison will use the lettuce definition. In real world, you should just write their function ones. There are no reason to define your punishing multiple times. But in our learning environment, this is useful to let you compare the different implementation of a function. So using your greed function, you know, have to specify the greeting you want to use. Let's say we want to say hi to Sarah and say hello to the others. We just need to write the greeting world. As the second argument the perimeters receive, the fellow of the arguments according to their position with our human goes to the first parameter. The second argument goes to the second perimeter and so on. It works, but notice that the new growth function is a bit more inconvenient to use. We only need to pass the name to the function before, but now we have the best of wood. Hello ourselves. This off. This we can said Hello is the default value for greeting in bison parameters that every fourth fellow are called optional parameters. Here we don't write any second argument. So in the function could the second argument, which is splitting releases default heavy here. We don't need to write the second argument because we want to use different words as a greeting. And here we used to the fourth fell again. This function now looks fine and hold on excess ended our questions so we can optionally say some smoke on you know bleating. No problem. We can add another parameter called small toe with the fourth fellow of empty Tex. Since 34 fellow off small talk is empty. If we don't specify it, it will bring nothing less than I out of new function. We can use it like the old function here with some small it up, the other function call and another deform usage. It works perfectly, but there is one problem. What if we want to add small talk but we want to give using the default creating. We can write it like this because you read the small talk as the second argument. And the second argument is for greeting. Yes, you can see the output is wrong. In this situation, we can use with the school s name. Our human basically you say which are human should receive the failure that you specify Here We say that looking great is Thea Human Horse Moto. And now the awkwardness corner name argument is the general term in computer science. But in life in the technical term for name and human is key. What I'm human and the technical term for a normal argument is position. Argument. Name argument are very convenient because you can write them in any order that you are you can his name argument whether the perimeter is optional? Just remember that one serious name argument all the subsequent arguments must be named argument to or else you'll get this error position or our human cannot be placed after key with human. So what? We only defined a function that consists off single line of code, but function can have many lines of code. For example, let's split hushing into two points. First, we combine greeting name and small talk into a variable called message. Let's add a period after the name to make out, but looks nicer. And then we printed. When you're hush and consists of multiple lines, it must be place under the function. The coalition and indented she was in the book will automatically add indentations for close under hunching declaration. All the coast that have the same in addition will be considered as part of the function until you write code that no longer have the same in tradition with function quotes, we will learn more about how the use indentation to group multiple lines of good in our next lesson, for now that you're safe or not. 8. 08 Code Blocks: grouping multiple code statements into a court block. It's the common feature in programming languages. Good blocks are used for many things and specifying function. Body is just one of them. Here you see the Jeffer script version of our function creed. The steps are the same, creating formidable message and then return it in JavaScript. The code block is created by writing some codes inside a pair of curly briquettes. In this example, we read the code block in a single line. And while this is a follow JavaScript, good writing code like this makes it hard to read. Generally, programmers will form on the go to make it look nicer and easier to read. This is the same function, both with better for mounting. We put every statement in different lines, and the court inside the court block is indented. Writing code with a good layout is optional in many languages, but writing this way show a degree of professionalism. It shows that you're could are ready to be read by anyone, your co workers, your boss or the whole world. If you write an open source code for nothing, your coat is a must. If you want to read code professionally. This is why, in life in formatting good is not optional. How you lay out your good can determine the validity were could in vice in good blocks always started with Colin But there are no characters that serve as a marking for the end of a code block step in Typhon indentation is used to represent goods that are within the same could block Kurtz in the same could block must have the same amount of In addition, even once miss different will make the cut blocks become painfully as long as the could in the same could block half the same amount of. In addition, the among of inundation itself is up to you. The recommended amount of indentation is for spaces. You can lease space or step s indentation, but you cannot mix them. Either you space for the whole good blocks or vice versa. You within a book well, in first, this by automatically comfort up in the four spaces. But if you are not writing code in Jupiter notebook, you must make sure that you don't next step in spaces in your could block yourself. Could blocks can contain could plucks For example, in bison, you can create a function inside the function. In cases like this, the inner could block must have greater amount of indentation than the Alcor could block a set. From that, the rule stay the same. There are many occasions where you must create a roadblock in life in you will learn about that in our future lessons. 9. 09 Function 2: function is a fairly powerful programming tool, and there are no restrictions on how Maney lines are good. You can put in a function, and this might make you wonder what kind of good should be put in a function. There is a programming principal called Single Responsibility Principle. It means that every entity in your good should only do one thing that related to the responsibility. A function should have a single objective that you want to accomplish. And it should not contents any other goods that don't relate to this objective. Let's check out Agreed function. This is really only one thing you can say that we really do One thing it brings grating to somewhere. It doesn't do anything else. It doesn't check the current time. It doesn't bring any other message or anything else under the hand. You could say that we do two things. First, it compose a message is a combination off greeting name and smoker. Second, it prints the message. The screen which view is correct is entirely depends on your objective. If your objective is to bring a greeting in the screen, then this function is fine. But maybe you don't always want to bring the greeting to the screen. Maybe you want to save the great indoor fire or uploaded to a server or any other things. If this is what you want, then good should just be responsible for creating the message. What to do with that message is the responsibility of other codes. So let's arrest the plane message. No, I just need to make the message available to the outside. Good. Her rivers inside a function is only feasible that function and can be access on the outside So we can do this. Yes, you can see outside of the function, buddy messages undefined. To get the fellow of this variable into the outset go, you have to return it from your function. This syntax for returning fellow from a function is to read Britain and the fellow You want to return. You can ascend the fellow, return from a function toe variable like any other family, note that this message variable is a new variable and different from the message variable inside greed. Now that we have the message, we can print it to make it less confusing. That's here is the message variable inside greed and directly within the combination off greeting name and small talk. You can also use function within. Hello, Derek Lee. Returning for you must be the last line in a function. Buddy, If you had another line of the return, it won't be executed. As you can see, the output doesn't content the text. Tess. Sudden at any court after rhythm? Yes, I said previously after we have necessarily return from great, we can do whatever we want. We did. For example, we can save the message so high to create the file use open function. The first human for open function is the name of the file. And the second argument is, the more we want to use. Since we want the right profile, we should best aws the moon open. We return a handle to the file we want to use. We assigned the handle to a variable called Mrs Fire. We can use the sender threat to the final using wrecked function that this part of the file handle after we rented the fine we must close the 500 are using close function. We can see that we have a new file as txt that contains the greeting message. This example showed that by restricting the responsibility with function, we actually make great to be more applicable to many cases. Previously, I said that variable stop data while function star coats in bison cause also considered to be data, and that means you can assign a function to variable. Here we assign great function. Toe variable, called Hale here now refers to the same court has great, and you can you sail as a function. When you create a function, you can think or function name as a variable that starts the good inside your function. This illustration showed that creating with function, it's equal to refining with variable that receive the function code. Of course, the button called This meant a holic bison. Good. I write it this way to give a little picture of what's actually happening since we're is actually just another variable you can assign under hers into it. Since God is no longer contain any boats, you can no longer use it like a function. But since we assigned the code in great to help, previously, we can make a plea for SPECTRE. The origin occurred by staining, hailed, agreed, and now we wouldn't be having like a function again if he had done assigned greater here previously when the sun haloed agreed the order general function can no longer because because nobody ever this refers do it. This is actually what happened in our previous listen. When we create multiple definition complete, we repeatedly assigned you coats in the grid and read only store the latest coat. The older courts are gone and can no longer be access. The ability to assign a function toe variable means that using the same variable, we can call different function using just one name. That means that you see this in variable. We can get multiple different behaviors. Let's say today is a new year and we want to set our before grating in great function to be happy New Year. We don't want the Chasity for fellow greeting from Hilo toe Happy New Year because the change is just temporary. We can create another function that called great with happy New Year s. The greeting are a new function. Just best the arguments to Hill and written the message we call him instead of great because we were assigned this new function to greet. And now every country we actually called our new function. If you want agreed to refer to our original function Just a sign. Health agreed, redefined and you function here. But since we're going to assign dysfunction agreed and not going to call it ourselves, we don't really needs to give with name. You know, kiss like this. We can use lambda harsh in in bison Linda function isn't anonymous function that consists only of single line. Misch is the new grid function with a lambda function to create the Lambda function just like the Lambda followed by the arguments Colin and put that you want to run the rules for Lambda Function. London fashion doesn't have a name. This lumber doesn't have any name. The water have name is the variable that received the longer Hussian s. It's fairly the school looks like the illustration I gave before about what happened when you create a function. But the school is a folly. Bicycle number function arguments are not surrounded by parenthesis. In fact, it is an adult the surrounding under harsh and arguments with parenthesis. London fashion will also much decorated than the fellow on its scope. We don't need to end written here, and it's actually an Arab to do so. Blame the hushen can only consist off single line and they all must be defined in the same line number. Function is intended if you need to write a small function quickly. If you need to run accomplice function, you strict with their harsh in instead. 10. 10 Modules: the good functioning and we created previously. It's a single function, but it doesn't mean that this useless. It can be used as a part of a more complex program. For example, we might want to greet the use of after they look into an app or a website, and he might be more than when I abstained. Need that great function. So we need to comfort great function into an independent could that can be used by many programs in by friend. It means we need through the grid function in the margin module is basically just a find that contained some python code. You can create a module from a text file from Jupiter notebook dish, but just click new interest sex one. That's Neymar module greeting that by module must have done by s extension, and the name of the module is the name of the fire. In this case, the name of the module is creating. Listen, I don't function. That's if are fine. Mescal. Bet that the dish work and create a new notebook while to use the module just right. Import module name to call a module function at the module name and a dot in front of the function in writing module name. Every time we call a function is inconvenient. Ended up two methods. Find that the first method is to just assigned the module function to a local variable. The second method is to specify which function we want to import from the module. To do that, we right from module name, import, fashion name and now we can you split directly in June Whitman book. The result off previous rounds is still exists in the system, which means that the result of our previous important still exists to make sure that we only have the result of our current import just started notebook that we specify. Image Fashion Inside the module that you want to use is the most common method. Theis functions inside modules, but with this method, you can no longer call the function by specifying it's much. Not sure can contain all folic wife includes not just functions. For example, we can add fashion for uber that show our measure faster. Let's save it and access it from our notebook. We get another here. Why invite? Often you can import the same module multiple times, but bison will only reads the file containing the module the first time. It's important, since we already important breeding module in our previous run wife, and we will use our previous model definition that doesn't contain function forever. To make our good works, I just need to start a notebook and now we can see the faction. One thing you should remember is that the name of the file will become the name of the module. It means that the name of the file must be a fund of five unidentified air. So don't put characters like space. Our dash in the module filename. Well, there, fellas, for a fine name. They're not various characters for wife and identify years house and make sure that your module file is in the same folder as your MacBook crime. Creating modules is a way to organize our program. But didn't go that handle unspecific rationality into its own physical file. We'll make our program to be better structure 11. 11 Class: previously, we learn about variables in portions. In this lesson, we learn about class. Place is an entity that combined variable and function in a single place. Let's take a look at our great function here. We're 33 members name breathing and smoke go, and the function is responsible for combining them into a message greeting in small talk every fourth values. And if you want to use different value, we have to write the new pill every time we called three. But this is so in our new year example. Sometimes we would like to set the same greeting or a small talk across multiple function calls. In other words, we would like to make greeting and smoke up to be an independent variables that the function is using. This kind of case is perfect for class, so let's write it. Class is more complex concept compared toa variable and function, so we will build our class that best there first. Let's create the definition for class right there would place followed by the name of the glass. Hold it by a common next. We must right the content of the quest, since we're not really do writing yet? Yes, right mess. Pacis Acute what that means. Do nothing if we don't Right past. You were getting better because glass must have content. They have best as our company in our class will become a valid place even though it doesn't do anything. The content of the classes that could block. So it must be indented to use our quest. We must create an instance of the class and assign it'll variable to create an instance of the class just right. The class name followed by parents. This is you can think of class as a blueprint. An instance as the physical house that this bill, according to the blueprint, just like multiple houses, can be built from the same blueprint. You can create multiple instances from the same class. In bison, you can add variable and function to an assistant. Instance. Yes, you start after the instance name to access our ad variable or caution. Since we already had our variables, let's add a method to create the message in our place. My foot is a function of this part of a glass. Let's go out of Mrs C in my life. In the instance, will be passes the first argument called Cell and the subsequent arguments out of the real argument for the function. We don't have arguments for bleeding and smoke because they were used the variables inside the instance. We can call this myself using grid instance, and it works wife and also has a shorthand for when calling a method with an instance, just change the glass name in the instance name and the instance will be implicitly past as the first argument to the method. The shorthand is the common way people used to call a method family. Instance, You will almost never see people calling function using the first form. So let's just listen. Let's try to call this method on another instance, and we're getting at it. The reason is we created greeting work and small talk inside. Great instance. It doesn't have any fairy embers. It will be nice if every instance of breeding will always contain breeding work and smoke off variables so that we can use this girl. This level underscore ended double and the score is a special function that will because implicitly, after an instant is created, we can use it to add very of us to every instance on the glass. The double underscore in the beginning and end of unit is usually pronounced as Dunder, so this function is called under in it. If you want to agree, a contended office called After an instant is created, you must never done deal in it. You can give it any other name, and now we do can answer you say function of that problem because it also has creating working smoke of variables. Obviously, different instances will have their own variables, and their fellow can be different. That's just a greeting work and small talk. For instance, we can say that great and greet two instance that different values for their caregivers same. I think we're always used the very bleeding work and small talk that have been said previously. But what if we want to set this variable back? So it's people fairies? While we can set, the variables are so the better. Tiny is to create a method that will do with Doris Lessing. Women reset now if you want to reset, the grating would been smoked up back through their report, Valley's richest little Cory said. Let's also change the cook in gender in it to call a receptor, said they really forcefully this way. If we ever want to, just before fellow, we just need to do it in one place. As you can see, the greeting work is no change. For our instances, that's just a greeting back when green is just a function. We just need to agree on a name to create a greeting message, have no good, is an instance. And to create a message you must call the same method. What if we want to use great instance like we use great caution? In other words, we want to do this. If we run this good, we'll get another. That's a great is not gullible. It is an instance, not the function there are. You can call it to make this good books. We must add another special function called under call Gender called this a special function that will be called if you call an instance like color function. We can just rename same asset into a gender call, and now our program looks good agree. Since reading glasses off all functionality of great function and more, we can just replace good function in our module with creating class. Let's also increase the fraction before previously the use of a Parma Julius Spirit function to create a greeting. But now there is no great conscience, only greeting glass. Fortunately, breathing place can be used like a function, so we can just create an instance of grating class called greed. And our code is still working, even the great isno an instant instead of hushen. When you agreed your module, try to keep your go Toby backward compatible with a previous version of your coat. This is really important because no one likes on the good that used to run just fine suddenly become in politics when they agreed to the new model. Life in itself is a good example of this breath, and three was released in 2008 and it's not big with competitively with spice into, which means that many course that was spotted in person to suddenly become in holly, inviting. Three. The lack of bigger compatibility makes many people refused to agree to bison three. Even though Python three brings many new improvements and for many years price into Yousef's speaker than bison three uses now, this press sensory issues more than person, too, but it takes a decade before that happens, and there are many persons of goods that are still used today. If you're good, disorderly, used by many people, you must think carefully before you break back with compatibility in your court. 12. 12 Conditionals: previously. We claim that our grating places backward compatible with Rick function, but it's not quite accurate with good function. We can drink this, but you can do it with our great in class to make sure that our great in class is completely backward. Compatible with Crick function, we must add greeting and small talk arguments in our gender call Greeting in Smoker are optional arguments, so they must have before fellows, you might think that just used the service variables like this. Unfortunately, that is not the holiday bison good in bison. An argument can access the fellow off other arguments. It is like this. We can just use none. It's after the fourth rallies. None is a special fellow that is used to denote an empty or non existent next unit to check each arguments. Its value is none. We will use the fellow of the variables inside self or else we will use the fellow of the argument itself to the checking we first need to understand bullion. 1,000,000,000 is a data time that only consists off two hills through and falls. We can get the fellow through our horse when we check for equality. Let's say we signed hello to experience. We can use double equal signed to check whether expel a is equal to help. As you can see, the result of shape is true because expelling is hello, a cucumber extra? None. The result is false because X Fellow is not lamb in programming. 1,000,000,000 data is usually used with conditioner. Conditioner is a problem in constructed juice, which foot is run based on some condition in bison conditioner is written using. If Stedman just that, if followed by a bullion fell, you followed by a common and the could you want to be executed when the 1,000,000,000 fellow is through. Since it is equal to hello, the family weepers, too. If it's true and the good in the F. Scott Block is executed. If expel is not hello, then the court in the F. Scott Bloch is not executed. Now that we understand conditioner, let's finish. I'm getting out of Denver. Call now. The message is always constructed from the method on humans. If the argument is not set by the method color, we will use the variables in the instance in the scope, we manually said the greeting is the argument repressed of the method in the sculptural. You see name parameter after said this mortal worst there, your single thing work from the instance now that if I'm did not identical, let's continue to learn about conditioner. Since you can check for equality, we can ask the check or in equality, use the exclamation mark and equal symbol to check whether in equality we checked, Mother X is not equal. Hello. But since X value is hello, that means X is equal to hello and are in equality. Check riddance falls. If you check with the X is not equal to high. We get through because expelling is not because I since if statement creates good blood, there can be more the lines of code that can be executed when the condition is true. In a statement, you can also add an option to execute undercuts when the condition is not fulfilled by as holding by Colin and the code you want to execute Now it. If segment is executed, X is not equal to hello. So escaped the cost in the difficult block and jump to the cook in the sport block. You can see if the check water multiple conditions. So another checking on the first year just right, Ellie, hold by another bully and really followed by a Colin and the cook you want to execute. And if it's just a shorthand for Steve, we can use this goodness. If X is equal to hello, execute the first code block. If X is not equal to handle, let's check again. If X is equal to high, it is through execute. The second could block. If it's not, let's check again. If X is equal to hate, it was to execute. The Fed could blow. If it's not, then just execute the last good block. We can have multiple lives in our if statement, but you can only have a single L. Scott Bloch, and it must be place last if I lived and else are part of the same statement, and their indentation must be identical if Sidman can contain with deeper good blocks, but at most only one could block will be executed in the school, only the good block inside LF X equal high is executed. Other good blocks, including asked block it's not executed if you only need to check with a single condition and execute the good when it's through and another code minutes falls. Bison has a simple a four months, just like the kota we execute. When the condition is through fall about you pull it by the condition followed by else, followed by the court to be executed when the condition is falls. The simpler if statement only takes a single line walker, and there's no need to add any Collins. Unlike the use of live statement in this wall, the else must be presence. It's an adult that I needed. We can use this form, so I'm did not reset function. No, we can use receptors that the grating work and small talk of. For instance, if we call Recep without pressing any arguments, then the greeting work and small talk will be set to our default. Since we said goodbye gender in it, we can answer at the parameters for beating in small talk in gender in a parameters and pass it Theresa. Now, when we cleared a new instance, we connect it with specifies everything within small though, and now it's a bit out of greeting was you and they are breeding place truly back with compatible with with function 13. 13 Comment And Documentation: six. Essence of Murder Standing group. There will be back faces. Addition of new pictures are changes to the orphanages. All this means that so Scott will change, and that's why it's important to make your Cisco could be easy to read. Reading. Could even your own can be hard? Sometimes. Maybe you're good is implementing a very complex Our charism or business process are maybe because for some reasons, you have to use non common way to quit something. In situation like this, you can add a credible explanation by using common in programming. Would coming is that taxing the suspected ISS used to anything? The code engineer Lee will be ignored by the compiler in bison Common. Start with the hash character in extent until the end off line. You can also place comment in the end of your code. While comment is used to explanation to the good, too much of them can be distracting Calmund expressing yourself spoke and consume your attention. So make sure that is really needed because your coat will be here the same way. Whether you have common or not, an example of good comment is coming to just repeat with the could do this comment is actually a bad coming. It just repeat what the cook is doing in this in any information soon. A seal is that another language common as they use as a recommendation for the so school documentation, is information and how to use the coat. The difference between a common in your recommendation is that a common is meant for the programs will maintain the coat. What a recommendation is for the programmers who will use the court problems will mean thing. The court needs to understand the court in detail to be ableto backwards or at the new functionality. While the programmer we just need to use the good only need to know how to use to cook correctly. They are not necessarily need or want to understand how they could this implemented. So in many cases, the recommendation of the coat is delivered. That's a separate document outside of the code. In Python, however, we can create a commendation that is embedded to the court called Dark String. To read the ducks ring, we can use help function. Let's try to read the recommendation off in question. Here we can see the function signature of pre the purpose of dysfunction and all of the arguments of the function. This information will help us to know how to use Quran properly. As for how bison implements bring, we're not interested in that to learn how dark strings works. Let's create a family function for testing. If we call help on our function, we can see the function signature. We also know that dysfunction is located in module gender. Me under me is the name of the module where our code is running. This Nigel is automatically created by passion. The ducks during the dysfunction, just our tax between people put after the function signature. When we learn help again, we can see our taxes displayed under the Russian signature. We can also use triple double quote instead of 3% were quote for our next ring. On my comment. Ducks drink and spend more people lines. This is usually used to describe the function arguments. Indeed, they like in the brain function. Duck string must be the worst thing in the code block. If you get some, could be for the ducks tree. The docks thing won't be recognized. Me, Bison, We can place Doc string in module class, method and function a professional got must have a good recommendation. Solis and some doctoring toe are greeting larger. First, let's look what the help function shows about that, would you? We have function. She wants the name of our module, the class and data that we have and the file of the machine. We see that price and gives a default explanation to gender call in general, in it because they are special functions. That person recognize it's finally sent by thing doesn't say anything because that's a function that we define ourselves, their arses on mentions about dental big and gendered regular. These are friends stuff. We will not talk about them in this residence. And now let's at the Ducks three. That's an agenda information, but are much that's right. The explanation of our questions did that Good practice when writing books string is to give examples how to use our who. Let's show how to create our instance, how to generate treating, how to chase the greeting work in the small crop and how to reset everything backs to the default Paris. We can also add DOC string for arm assets, but What are we going to write? The search of all our medicines have been sure in the examples, so there is no need to repeat that in our methods of string. That's increments are harsh. Endo, Finish debating this module and let's see of new duck string. One thing you should remember is to make sure that your comment inbox string is up to date with the latest state of the court. For example, if we change the default fellow of greeting press, we must have been out of duck story, especially the class explanation and the samples. Failure to do that will create confusion, the uses, because their confrontation doesn't match the reality, and that's not something you want to happen. 14. 14 Container: in the previous session. We have created greeting module. Let's create a fictional scenario toe. Better illustrate the Yusof armature. I am a shop owner and I want to install some dot matrix display in my store to show the greeting. I compare many brains off dot matrix display and see which one provided a bison module. Still access the display. There is a brand called Feel Light that provides bison machine to access that this place. So I'm about to under this please. The modules can access that displaces called Feel I don't buy. First, let's import feel like mature and read the documentation. It says that the function to show tax in the display is show tax, and the parameter is the hardware idea and the techs. Let's look at the display that I'm Bob. Their idea is Q W 3 to 44 and H 37899 lets you should thanks without a great function. Off course we like Module is just a Kodi right to similarly of situation. So what it does is your spring, the idea in text of the screen. But it is like me that the real display module will have a similar function, so just imagine that the Texas actually shown in its separate display. Now, if you see this to Lance off good, they are very similar. The only difference is the idea of the display where the greeting should mission. When you have a situation where you want to do the same Operation toe a Bashar failures consider putting this fellow's into a container container is an object that can hold arbitrary number off under objects. They are used to group objects that have close relations in a single place. There are many types of container in python, so let's start with the most use container, at least to create at least right, all the fellow inside the square. Break it, separated by comma rest. Create the least of our peace, please. The values inside a container is usually called as the elements are the items off the container. To access an item of the container, right, the containers name, followed by the items index inside a square. Break it. This car is accessing the first item in the list wife one U zero index access, which mean that the first element off container has index zero and not index one. If you never program before, this may look strange. Nevertheless, zero index access is what we use convention in many programming languages. Yes, remember the substrate one. If you want to access a particular containers item, for example, if you want to access the second element on the list, you must use Index one and index to boy. We can access each element of container separately. What we want to do is to repeatedly called show tax with each element of the list. In programming language, there is a concept called Luke. Luke is a construct where some call is called reputedly. In prison, there is a type of look all four loop that is just what we need to create for look just right for, followed by a variable followed by in followed by a container, followed by a column for look, creates a good block. And in the court blocks, let's just call Shell Tex. When you execute this girl, you'll say that every element in the list is printed to the screen for a loop. Works by executing the courts in for cuts block as many time as the number of elements in the race. In the first round, Deace assigned a fellow of the first element in the second round. He is assigned the fellow of the Second Element and so on, using for Loop Me, Arco, Toby, more structured comforts to manually writing show taxi multiple times. If we had another displaced, then we only need to update the least, and she attacks will automatically called for them. Let's with our look into a function so we can easily collect multiple times. Let's say we don't want to show our greeting in all of the displays. We just want to show our greeting in to off them. We can create a new list greeting this place. This list is initially empty, but we can use This is a pen method toe, a new element always that's called share. Everything without new lease have been breathable at element to the end of the list. If you want to add an element into another position, we can use insert method in certain at Element and the specified index and the element and all elements after it will be shifted to the next position. We can also change the fellow off. This is an animal. We can also remove elements from the least. In fact, there are several ways to do it. That's creating new cell where we will create a list and then delete some off its elements . The first way to remove an element from release history tell and the elements that you want to remove. Let's bring the current fellow of the list, and we can say that the second element is now gone. The second wave of relentless element is to use pot method and passing the index that you want to remove. Unlike them, hope really is in the element that was removed so we can see it. If you don't specify any India's is what we'll remove The last element the last way is to use remove method. Unlike Pope Indo, we don't best the index that we want to remove, but the fellow that we want to remove if the list is containing several values about I'm actually the one with specify only the was matching element is deleted like they're removed , listened it on. The element is deleted. If you want to access just some part of the whole lease, we don't really need to create another list for that in prior offenders and technique to access just some part of the containers called slicing. The slicing syntax is write the name of the container, followed by Open Square breaker, followed by stopping next, followed by Colin, followed by an index and followed by Close Square breaker. Let's see an example of you in just a lie, sings the stock indexes. One or the second element on the end index is empty when the end indexes empty it before. So the end of the container, we can see that the for loop is only processing the element of the least, starting from the second element on work in the sculptor start indexes empty when the study indexes empty it before. So the first element. The index is three with just the fourth element, but we see that only the 1st 3 elements are printed in. So I seen the index issue system at the end of slicing and not part of the slicing itself. In other words, we can get this slicing as take the elements of the list from the first element until before the forced element in this slicing. We specify both the start index and the index. The direction off iteration is started from the lower index to the greater index. If the stock index is greater than the index, then the alliteration will happen. In bison. We can use negative number as index. When using negative index, we start counting from the end of the container. The Scope prince the first element from the end of the container. This illustration shows the position of the index both with positive and negative index. As you can see, the negative index is not zero based index. It starts from minus one, not mine. Zero in slicing, we can also use negative index like this. This will take the elements starting from the second element from the end of the container . One of these we'll take the element from the first until before the first element. From the end of the container, we can set both the start and in next. With a negative index, we can also combine the positive and negative index in our slicing. This God will bring all the elements except for the first and the last elements. Slicing also has a second floor. This is just like the first form but we have additional failure. Strike strike is the amount of step taken when moving from one element to another. Very force tried this one. This slicing were takes elements starting from the first element and germs to the element. Two steps from the previous element and so on. This is a similar slicing, but it will jump. So the element three steps from the previous element. You can also use a negative number assist right when he is a negative numbers as this tripe . The direction of the operation is now starting from the end of the container toe the start of the container. This God will bring the leases elements in reverse order with negatives, right. The stock index must be greater than the end index or else no insulation will be done with slicing. We can access some part of the list without creating new lease. But sometimes the elements we want to access cannot be specified using slicing. For example, let's say we want to access the first, the second and last element from our lease. There are no combination off start index and index and strike that can fulfill this requirement. In this situation. We must create another lease, but it doesn't have to contain the same time off elements is our original lease we can create least containing in this is that we want to access. And you said to access the elements we want to use in the skull instead. Off in threating off display. Alice, we eat rep a police off in this is and each element has index to access that this please. 15. 15 Container 2: in our previous less than we have unless of this place, and we need to choose which display that will show are bleeding. In other words, what does she display? There is a corresponding like that show whether this display will show our tax or not. This kind of scenario is perfect for our next container Dictionary. Dictionary is a container like this, but dictionaries element consists of two parts key and very. In our case, we will make the harbor ideas the key. And for the family, we will use a 1,000,000,000 that will show whether this display is active or not. Dictionary is curly brackets to wrap its element and come out a separate issue element for which l a menu, right? The key, followed by Kahlan and the fellow we can use for loops to it right off for a dictionary. But if you write a love like we use with the list, we will only get the keys to get both the key and the failure we need to use items method. When we use items method, we can get the key and the fellow in separate variable, and we can use the value to determine whether to show the grating or not like previously. Let's put this look into a function we can you square Brecher toe access the element of the dictionary like we do with Reese. But instead of Messing Index, we must press a key. We can also use it to chase the fellow of the element. No, we only need to set the fellow of the displaced to mark whether they are active. For now, Square bracket can also be used to add an element of the dictionary. This code will enter New Element with the I. D. A. J 8755 and through s the failure since square break, it can be used to both editing element or at in your helmet. You must be careful not to accidentally add an element when you try to edit an existing Everman in this cook. We actually want to, said the display p 3458 the force. But they make a mistake. When were the key? So what we actually did was adding an element with P E 3457 as the key and false as the fell. If we want to remove an element from the dictionary. We can use the Dell Statement autobus method, so make sure that we only changed existing values. We can checks worse if our KIIS access in the dictionary using the key word in we only chest the fellow of the dictionaries element. If the key is access. As you can see, there are no elements with I. D. P 3457 So the dictionary stays the same. Let's change the court into a function so we can use it repeatedly. With this function, we can easily active it already. Activity any displace in the dictionary. 16. 16 Number: up under now usually only assigned attacks fellow in the variable. In this lesson, we learn about number data. Time to use a number. Just write the number without any court. Fellow. One and fellow do both printed this five, but they are different data types and have different behave here because fellow do is a number. We can do arithmetic operation into it. This God will bring eight, because five plus three is eight. If you know the same operation with fellow one, we'll get an error because you can add a number two attacks if we chase a number three to a text. Three. We won't get an error, but the result is tax 53 When plus sign issues between number, it means addition. But when used with text, it becomes tax. Concatenation. Plus sign is an example of operator, a symbol that have special meaning in life. In different that that I support different kind off operators numbers about many kinds off operators. Like other letter, perhaps we can check for equality and inequality between two number with a number we can use obstruction. We can do a multiplication in programming languages. A statist is commonly used as multiplication sign we can do deficient when you sing slash sign for deficient, the result will be a fractional number. If we want, the result will be around number. We get to use double slash. We can do model ISS if you don't know model icis operation to find the remainder offer deficient 535 by two is two with one as the remainder model issues person sign as the operator If the result off model is zero, that means that the first number is divisible by the second number. We can use this fact to check whether a number is different are up. We just need the model of that number with two you're very south zero then the number is even If not, then the number is we can do bore operation using double A stories and since the operation is yes power operation with fractional value, we can still use part off better for true cooperation. This will find the square root of 25 richest five. You can also combat whether one number is greater or less than another number. We can also check whether a number is greater than or equal to another number using greater than sign an equal sign. Conversely, we can also check whether a number is less than or equal to another number. Using less than sign an equal sign, we can combine the comparison operators to check whether the number is in some ridge and Leslie. We have negation operator that will in first the sign off a number of its opposite negation operator is minus sign. Remember that negation flipped the sign of a number self. If you need get a negative number, you will get a positive number. 17. 17 Boolean: as we mentioned in our conditional listen. Julian is letter type, and his only two fares through and holes conditioner will always expect bullion fell, but it inside that other types can be implicitly converted to a 1,000,000,000 so they can also be used in conditioner. An empty text value is equal to force, but any other non and the text is equal to through zero is considered this false while any other non zero number is considered. That's true. Any empty containers is equal to false, while any container that has at this one element is considered through, no matter what the fellow that ever made 1,000,000,000 type also have operators of their own. The first is negation operator now not do it and threw in the false and false into True. The 2nd 1,000,000,000 operator is an operator, and a plethora takes two billion argument and were written through only if both are true and, uh, play there is usually used in conditioner to do something based on several criteria. For example, let's say the secretary in to be able to open a driving licence is you must be 17 or order , and he must pass the driving this, we can cut that like this. If either your issues below, second in or you don't pass the test, you can have a driving licence. The fed up later is our operator. Our operator were written holes only. When both arguments are false, our operator issues in conditional. We just need for at least one of the condition to be true. For example, if you want to find a number that is divisible by three or five, we can cut it like this. Most programming languages has a feature called short Circuit. It means that if the result of a 1,000,000,000 operation can be determined from the first argument this second argument, it's not executed to illustrate this. That's great to function F one and have to this one Shindand do anything but printing their names and returning the perimeter they receive. If you run this code, we can say about the name Path one, and after it's planted in the screen between that F one enough to are both executed, my bison. But if we change the first fellow into false suddenly after, it's no longer printed in the screen. This is because in the first value off and your brother is false, the recent will be guaranteed to be force. Whatever the fellow of the second argument is, this is why, if the first argument off and your brother is false, iPhone will not execute the second on human. And that's why F, though, is not printed in the screen. The same thing also happened with our operator in the case, off or operator. If the first argument is true, then the result will be true. So the second argument is not check. Shirts that quit can be useful toe afford expensive checking. For example. When we look into an online application, we need to check the past with first to know whether a pestle this for a little night. We must ask the surfer That's greater than the function to simulate this step. Because this is just a Grammy function. Let just always written through. And let's say the content of the best word that the use of this entered is invariable password. In our application, we have a rule. Did persuade link cannot be less than eight characters. We can do the checking like this. We reject the passport, the Lang is insufficient or the Foundation fails. Connecting the surfer is expensive operation, so we place there followed its function as the second argument on the or operator. Whenever I use their enters a festival that has relying less than eight characters, we can swiftly reject it and we don't bother esteem. The surfer Onley The festival is eight characters on more We must ask the set foot of followed in the face work. 18. 18 String: In this lesson, we learn about string, which is what tax data is called in life in. We have history many times before, because tax is the primary way we communicate with the user of our program. In programming, there are a lot off that's importing, creating string from several variables. For example, let's say we have variable H and we want to create the string that say, my age is whatever the fellow on the variable if you're in this court, will get an error because we try to come get the string with the number, the string can only be combined with another string, so we have to confirm our number into a string. We can use the SDR function to do that, and now our programming is running just fine. Not all that the types can be converted to a string, but STL function will be able to comfort number, bullying and container industry while manually concocting its during. It's doable. Better performance can be a church were using in new features in Python 3.6 called F String , to use extreme just at every about the stream and write the variable we want to use inside a pair of curly braces with F string. We don't have to call a stair function inside the curly braces. We can put any followed by thing expression, not just variable. And what we get is the result of the expression, not the expression is so. A string can be seen as a special type of container that only contained characters, and we can use index operator to get a partial content off history we can combine after eating. We have learned so far thing created to order your function that will turn a number internally. No number first within the number argument industry, then for the ordinary, use DHS the default because most number of honesty is just the audio, you know, check the numbers three. To say that if the number ends with one, but not with a weapon, which is our Ordina Tost is the number and still been on this 12th which is the ordinance to Andy. If the number ends with three but not the first in which is the order, Noto already, and we just need to return the number plus the ordinary. Let's try our function. We can use this to generate message for our greeting module