Python 3: Programming in Python for Beginners | Arkadiusz Włodarczyk | Skillshare

Playback Speed


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

Python 3: Programming in Python for Beginners

teacher avatar Arkadiusz Włodarczyk, Professional teacher

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

73 Lessons (11h 17m)
    • 1. What will you know after this course?

      3:10
    • 2. What is Python? Installation and first execution

      8:47
    • 3. Variables, creating and running external srcript, interactive Shell

      14:06
    • 4. Comments

      3:17
    • 5. Types of Variables

      8:59
    • 6. Math Operators

      10:12
    • 7. Exercise: adding VAT to products

      8:12
    • 8. Semicolon and ENTER - assigning multiple values to variables at once

      4:30
    • 9. Assignment operators

      2:18
    • 10. Playing with Strings (Slicing, adding and having fun)

      10:01
    • 11. Importing libraries - basics

      10:51
    • 12. ATTENTION - important lecture about common mistake regarding functions

      5:22
    • 13. Taking data from user and type conversion (casting)

      11:52
    • 14. Comparison (Relational) Operators

      5:10
    • 15. Instruction 'if' why INDENTATION is IMPORTANT in Python | DO NOT SKIP!

      10:50
    • 16. Calculator Exercise

      11:05
    • 17. Values different than zero

      3:04
    • 18. Logical Operators

      9:58
    • 19. Loop while

      6:06
    • 20. EXERCSE: Summing numbers

      8:08
    • 21. Loop for

      6:12
    • 22. Break and continue

      11:20
    • 23. EXERCISE: Guess Number

      8:34
    • 24. What are Lists? Basic operations on lists

      9:36
    • 25. Checking if element is 'in' or 'not in' the list

      2:41
    • 26. Operating on lists with Functions

      13:34
    • 27. Tuples - what does immutable mean?

      5:20
    • 28. Dictionary

      10:08
    • 29. Sets

      7:12
    • 30. Operations on sets

      7:32
    • 31. Nested types

      12:49
    • 32. Processing nested types using loops

      3:28
    • 33. Dictionary inside Dictionary, Dictionary inside List - when to choose which?

      8:37
    • 34. Extracting records from nested dictionaries

      19:33
    • 35. EXERCISE: Dynamic dictionary with definitions

      12:20
    • 36. List comprehensions

      10:14
    • 37. Python generator expressions

      11:29
    • 38. Dictionary comprehensions

      14:04
    • 39. Set comprehension

      2:51
    • 40. EXERCISE: Finding numbers that are divisible by 7, but are not divisible by 5

      10:25
    • 41. How to create a function? What problem functions solve?

      10:25
    • 42. Passing more than one argument, function with multiple parameters

      4:46
    • 43. Returning values 'return'

      12:26
    • 44. Your own modules imported

      9:52
    • 45. enum - what it is and why you should use it?

      13:01
    • 46. EXERCISE: Arithmetic sequence, summing numbers up to entered number

      13:49
    • 47. Measuring PERFORMANCE of code | How well (fast) some part of code work

      15:06
    • 48. Function as argument of another function | How to measure performance of func

      7:19
    • 49. Default arguments

      7:21
    • 50. Keyword and positional arguments

      8:31
    • 51. EXERCISE - checking if value is in container

      6:48
    • 52. Variable length argument

      11:45
    • 53. Local vs Global Variables - scope - lifetime of variables

      9:12
    • 54. Immutable vs mutable objects

      20:56
    • 55. Shallow vs Deep copy of object

      14:08
    • 56. Lambda | Anonymous functions - what are they? when should you use them?

      11:49
    • 57. Drawing random numbers - creating a program that checks if you hit the monster

      14:47
    • 58. Random events - choice vs choices function

      9:04
    • 59. shuffle - shuffling cards in 'war' game

      3:04
    • 60. EXERCISE: Drawing elements without REPETITION - lottery game - 6 numbers from 49

      12:46
    • 61. EXERCISE | GAME - Drawing random chests colours with random rewards

      25:02
    • 62. EXERCISE | GAME - drawing approximate values to a certain value

      8:05
    • 63. What is a file? How to create it? Why do we need to CLOSE it? How to save data?

      10:09
    • 64. Exceptions, try, finally block on practical example

      4:22
    • 65. Opening the file using: with... as...:

      3:01
    • 66. Reading the content of file - read vs readlines, splitting lines, encoding

      7:29
    • 67. seek and tell - changing and reading the position of last operation in file

      5:04
    • 68. append - adding text at the end of file

      2:21
    • 69. a+, r+, w+ - two function file opening modes

      6:34
    • 70. Keyword except - catching exceptions - EXERCISE - loading names and surnames

      12:29
    • 71. Generator functions - yield keyword

      13:30
    • 72. EXERCISE: Generate infinite amount of numbers multiplied by themselves

      6:19
    • 73. Send method in generator functions

      11:54
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

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.

7,648

Students

29

Projects

About This Class

Save your precious time by buying this Python course. You will learn how to program in Python in a fast and easy way!

If you want to learn a language that can be used in every circumstance and earn good money then you are in the right place!

All of this is presented by a young man who shares his knowledge, so the language used can be easily understood by everyone.

The course is designed for those who don't have any prior knowledge about programming. It doesn't matter if you have never written any programs or you have no idea about programming... After my course all of this will change. You will bust the myth that programming is a difficult thing only for the few!

Python is:

  • easy to learn and read,
  • fast
  • universal (tons of useful libraries available)

Python is used by:

  • Google (Youtube)
  • Facebook 
  • Dropbox
  • Yahoo
  • NASA
  • IBM
  • Mozilla
  • Reddit

After this Python course you will know:

  • how to import and use basic Python libraries

  • what are the functions and how to use them

  • how arithmetic, logical and relational operators work

  • how to operate on Strings :-)

  • how to create conditions with the help of conditional statements

  • what they are and when to use lists, collections, tuples, dictionaries

  • how to create advanced expressions for generating, lists, dictionaries and sets.

  • how loops work

  • how to handle files

  • how to create random events on a mini game.

  • how to support JSON format on a practical example - requesting content from API servers

  • how to install external PyPi packages

  • how to handle Visual Studio Code in Python

That's not all!

The Python course has a lot of practical exercises.

Python is often used by professional programmers. Even tho they uses daily other languages, they still use Python to solve complex problems.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I believe that everyone has the ability to develop software if they are taught properly. Including you. I'm going to give you the context of each new concept I teach you. After my course you will finally understand everything that you code.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If you have any questions regarding the topics covered in this Python course, please feel free to ask. I'm always happy to help those who want to learn!

JOIN NOW and become Expert in Python

Meet Your Teacher

Teacher Profile Image

Arkadiusz Włodarczyk

Professional teacher

Teacher

I am the author of 27 very popular video courses about programming, web-development and math in Poland. I've also created 7 video courses in English. Over 300,000 people enrolled in my courses. I put all my heart into creation of courses. I always try to explain everything the easiest possible way. I'm sure that my courses will help you in the programming and web development adventure :)

I believe that everyone has the ability to develop software if they are taught properly. Including you. I'm going to give you the context of each new concept I teach you. After my course you will finally understand everything that you code.

I've been developing websites for over 15 years and i've been programming for over 10 years. I have enormous experience in that matter and I want to sh... See full profile

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
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.

Transcripts

1. What will you know after this course?: Hello, my friend. Welcome to the video cars regarding Piped on. This course consists off over 70 lessons and it's over 10 hours long. Yes, it's so big. If you're asking yourself each time when you learn something new questions like why the window envelopes? Why they're constructed like that and so on. Then you are in the right place because I would explain you everything. The regarding the vital from scratch. I believe that everyone has the ability to develop software ive they are taught properly, including you. I'm going to give you the context off age new concept I t Jew. After my course, you will finally understand everything that you coat what you will know after discuss. As you can see, you will know lots of stuff. You will know semantic off fighting, which means meaning of words. In Parton. It would be fluent in this language which will allow you to create whatever you want. You will know things like functions operators, how to parade in string, conditional statements. Differences between these collection stop of dictionaries went to use each of them how to measure the performance and so on lobes how to handle fires importing pipe and libraries. And that's not all I showed during the course. A lot off practical examples. Okay, So you might be also asking yourself Why should you choose my cars? Because I have enormous experience in teaching other people and I do it a different way. I always explained everything from scratch. I do not omit anything after discourse. You have knowledge. And what is the most important thing? Ability Toe read, fightin without any problems. If you know how to read, fight on libraries, you condemn program whatever you want. My courses are updated frequently you have held regarding cover Top is if you have any questions, you can just ask them. I really love helping other people. What you should know before discourse This empty space suggests that, Yeah, you don't need to know anything. This is a course for beginners. You can just start watching discovers without totally any knowledge regarding programming, you can just watch it and become somebody who can program in Titan. Who am I? Well, my name is our cottage with Africa, and I have enormous experiences you can see in programming in developing websites. And also I have over 100 thousands off students who have enrolled my courses. So yeah, lots of people believe in me. They are mostly satisfied. As you can see, here are sample common sample reviews about my courses. You can read more about more reviews regarding my courses on Internet. If you have any questions, remember feel free to ask because I love helping others. Okay, I will respond as fast as possible. So please go on, have a good day. And thank you for watching the first introduction video. 2. What is Python? Installation and first execution: Hello, everybody. Today we're going to Donald fight on. I would tell you what they spied on and I would tell the world is a programming language. I will also show you how to have your first interaction with vital. So how? Toe order pipeline To do something that you command. And in order to do it, we need to first download fight. Let's type Iten in Google And then we will go into fighting that our website is an official website off vital. There is a section that is called downloads and here you can choose your system will choose Windows and we can choose from this place here the newest version, which is 3.7 point four. If you are using other systems jobs, critical market does or other platforms you and download the bite on for your system. So let's can come fightem. Let's save five and let's weigh the second until it downloads when we click here and we could weaken Ran. We're gonna have a set up message here. You should choose this. Think you're at bite on 3.7 towpath. Do it. Believe me, it will save you time when you want toe act Despite on from something with this cold command line, you will not need toe right path toe the fightin to where it's installed. You were just need to type Iten. Okay, that's all. And you can just execute fight on things. So is this a few times in future? So choose it, click on it and what you can kick install now. And as you can see, there are many things being instead now relaxed under library interpreter We would talk about it. So So this is really not only a language that is being installed there lots of things in style in this package. Okay, let's no close it. And well, we have in started. But now how can we open the thing that we will work with, right? Well, here in windows here we can creek on this think And here we can type here to set right so we can type here I the l A which sends for integrated, which means there are lots of things in their development. So this is a place where will develop our applications In part I don't environment So this is the place where we will spend lots of our time, right? And when we could go on it, we have got something will discolor Shell. Okay. Show is a place where you can have in direction with Pichon interpreter and with shells itself, you can type use a few things. For example, two plots do. And when you could enter, you see as a result for so you can send him operations that should be interpreted by interpreter. So interpreter is interpreting eso. It's analyzing the things that you show here and it changes it to something good is called bike of You need to know what is programming language. Well, the truth is that I'm taking talking to you right now in English And you understand me, right? Probably. But you know the problem is that Ah, if you wanted to speak with me in Polish, that will be probably problem. We will need tohave a translator. Interpreter from fightin is something like that. It is a translator translates this think to something like that. 010101 Okay, I am not sure if it will change it toe exactly something that but it will change. So the sequence of zero and one What is that sequence? Well, our computer, he has got something. Will disc auld protesters and protesters interprets the jumps in voltage involved in something like that. Okay. Ah. And these jobs are between zero in once and everything you see in your computer. Whatever you see. Like, you know, even this shell, the Web browser, whatever right is interpreted from zero and one toe. These things. Okay, An interpreter. It is changing thes language, right? The thing that we wrote here in tow this our computer interprets this and then we have got as a result, as you can see, for example, for or whatever we can send commands, for example. Hey, you know, I would like you to print, so I type print, and I would like to print you something like hell award, for example. Right. And when I click enter, as you can see, it printed for me. Hell award. Okay, so interpreter interpreted this line. It's changed it. 20101 sequence, some kind off and always concede then because computer could interpret zero in one sequence . Hell award. Okay. And as you can see, here is a commander I can put you whatever I want. Right, Prince? As you can see this, this doesn't work too, because print is something that is known by fightin. It is a command is a function. We talk about the Maurin future and we learned many, many more functions. Commands like that that will help us operate. That will make us more powerful, right? We'll be able to create more things will be able to change many more things because off knowing libraries that have got names like that. Okay, So the truth is that if you want to become a programmer unity land, lots off functions, comments like that and you need to know the syntax. So you need to know when to not make errors. So, for example, when you make something like that Hell award. And as you can see, I will not put at the end of these parentis is here. I will have probably something like a narrower like he was waiting for for me. Toe ended when I click under, but as you can see eat. Ah, you meet toe ride your coat the way it was expected to write on. So we need to lend the same tax. I need to lend how that coat should look like in order to note, make arrows like that. And do not worry, because when you make some errors, right, you always get something like that. The syntax error. Ah, message. And when you come for it and when he pays it here, you'll see that you will get lots off results that will lead to probably the fix for your problem. When I click here, you'll not this probably. Oh, you see, you're not putting a quote before the end of line. Okay, so that's why I had this problem, right? Ah, did the stack overflow is really great website. Probably. If you are asking yourself something, that question was probably already answered on this website. Okay, this great website, even experts in programming uses these website because it's just those of time toe every time invent the wheel from the scratch. OK, it's good idea to sometimes ask people instead off, you know, doing everything on your own. So when you see that the error like that, you can just put the Q and you get probably answer okay in Google or in the stock over floor, or you can also ask me, writing the questions and the answer discussion section. I'd like to help people. So if you have any problems the Lord War, I would be glad to help him. So we now know what this programming language. Okay, this is something that is usedto communicate with our computer. This language is translated into the 010 on. So the bike out and lighter, that code is interpreted line by line by our computer on, and we can see the result like that. Okay, So that's only good lesson in the future. Will Then how we should write things, why we use the quote, single quotes, care why Prentice's are needed and many other things like that. OK, do not worry. That's the only first Lexan. Everything will be explained better. You have any questions? As always, feel free to ask 3. Variables, creating and running external srcript, interactive Shell: and everybody. Today, we're going to talk about something, go discovery labels. And we'll also talk how that interactive show is working and how to create our own script. Okay, because so far we have typed something in this interactive said Like, for example, for past five, and we have acquired a result, like nine. That'll do. Imagine writing programs like that every time when you want to change something in your program, your would need to create it from the scratch inside this. Think that would be horrible. That's why we have got something. What? This cult scripts that can be run by despite and so we can save the code for later, and we can run it later. Okay, so how could we do it? Well, we need to click on file, then on the new fight. And then we have got a editor opened like these one. And as you can see now, this fire that is gonna be our script is untitled. We can change these. The name off this thing on deacon type here, some kind of cult. So let's, for example, print something like sample. Okay. And let's say it fine, save us and As you can see, the default place that it wants us to save it is where the pipes on this installed So we cannot type the name of our script. So, for example, sample and the extension will be added automatically. It will be that Be why? So we do this something like that. When we kick safe, probably it will work, but it doesn't need to because we are saving it in the pipe and folder. And it can lead to problems because there can be problems with window privileges. That's why it's when you have got a narrow. If you have a narrow, then save it on. For example, documents folder or on a disk that is not assistant disc. Okay, so you have got the message is you can do it, then save it somewhere else. And now we can just click safe. So we have got now sample saved. We cannot open this thing if we had to close it right here is a sample. But we can also do something that five open and then we can go to death documents and you can open that school right, because you can open it and we have got. It's safe summer so we can have a cold that we can reuse later. And now we can run it when you click on run and then around more. Do as you can see we have got here as a result sample. So it's working. We can change the code here, So I have just compiled a that we're using the controversy shortcut and now control plus V . And now we can run the motor. And as you can see, we have got the sample sent here to the output a few times. So it's working right. It's pretty cool, right, because you can make safe occult and reuse it later. Of course, this code will be a bit more complex in these one. OK, now it's time to talk about variables OK about things that it's called variables. And what is it This think is a container. Variable is a container that can hold. Thinks you named this continent like, for example, ABC, or it can be more self descriptive like, for example, age, speed, name or something, girls, right, You can name it and you can put into it like into these boxes here, some kind off content, right? So variable when you look at the name of a rebel variable. So it is something that is able to Very it means that you can change the content off these books any time you want to something else. So why would you need something like variable? Oh, well, the simple way to explain why you needed is that Well, when I write something like that four plus five, I have got the result here, and I don't have it anywhere saved. Right is I've just losses. I can't take this nine from here and do something moving later. Right? But with variables, we can do it easily. We can write, for example, a he calls four plus five. And then we can use this label, this label that we called a later and we can send it to death out so we can send the value later out So I can do, for example, like that Print a. And when I ran the mogul. As you can see, we have got denying here on the out we can at even more or change that value so we can change it to later to something guys like for example, 10. Bring a And as you can see now we have good. You tend because we changed the value of 8 to 10. So that's really cool, right? Because we can now use reuse that value later. Right? We can do something also like that. A equals a plus five. What does it mean? It means that I want to add toe a the value that was there. So it was nine here, right, four plus five piece nine. So nine plus five. So let's send it to the output like that. Run. And as you can see, we have Good. Now 14. That's true, right? So we can add the value that was there before. So this is the use of variables. We can change the values inside off the labels. Who can we use them? And off course. Right now we put the data the information manually. But in future you will get the content for these variables and from for example, database from a fire from the user. Right. So right now it is. It is just a simple examples. So we do not make it complex. We just assign a sane means that we put the volume manually, so we just type it like that. Okay, so this is a variable variable is a container that holds some kind of content, and this content can be integers like these one, that sequence of characters and other things like that. But we talk about types of rebels in the future. Lectures for now. Just remember what is what is very and why do we need this concept in order to understand what is interactive shell? Look, you have probably noticed that every time when I ran the module we have got here a message like that restart, which means it restarts the shell. So it means that everything that was written before doesn't belong toe that shell anymore. It disappeared. Okay, Everything that you've done from before. But it also means that you have good now access to everything from this script. Still, even though the script has already bean run So when I type print A, you will notice that we have good steel value. 10 inside a right. We can add to a for example five and we have good 15. We can steal work on the script that been run from this place. Okay, That's why this thing is called interactive shell, because you can have an interaction with the scripts that are run. Okay, we can do whatever we want with this creep like that. I know that right now, when if you are a beginner, it might no feel like is useful. But believe me, it's pretty cool feature that is, that doesn't exist in other programming languages because in other programming languages when you run program, that program will just return result that you can use in other programs. And it's all. But you cannot, you know, work on every variable, every function, other things like that from discreet. Okay, so that's pretty unique. That's why this think is called interactive Show. And you can also, for example, restart the shell manually. And from now, when we do something like that, as you can see, we will get the message Name. A is not defined, which means it has not. Bean created doesn't exist. OK, so from now everything we start from scratch. Every time you restart the shell, you start from scratch. It's also good to know that when you create, for example, variable a and you sign keep five interactive shell. You can print the value without having to use the print command. You can just type a this can see you have good. The volume. You? Well, I did it a few. Um, I hope I haven't confused you here. So you do not need to use the parent in order to see the results like that. Okay, by the way, do not worry when you make mistakes when you make errors like it because it's pretty common when you are starting your programming adventure. Really? You will make tons off errors and it's normal. Do not worry. It's good idea to practice. Okay, So after this lecture, try to create script. Great. If I name it, whatever you want. And after it saved, saved. If I create some kind of called great two variables assigned. So put some values, interred it into these variables and print them on the output and then run the module random. Run the script and see the result. Okay. And play with variables. This good idea toe Every time when you finish lectures from discourse to practice on your own, the same things I did. And in addition to this is a good idea to give yourself, like, 5 to 20 minutes break after each lecture. Before you start practicing because you're brain, we start to forget what it has learned. And this is the best time toe learn things. Because if you do not let him, do not let the brain forget the think After 20 minutes, it's gonna be in your brain for longer. It's gonna, you know, you're gonna fortify. You're gonna reinforce Did these memories off things that were about to be forgotten. Okay, so remember, practice practice in the game practice programming after each lecture. Do the same things that I did in the left. And in addition to these, remember to look how I write code. Look, I added space here. I didn't need to, because if you don't, the program will run to right. But look, this doesn't look as good as this, right? And as this, this is cleaner coat. Try to create clean coat, and in order to create a crank out, you need to look how I do it. And you need to make habits off making cream coat from the start. If you are. If you're gonna be lazy, and you do not have a clean coat from start, you're gonna have problems in future. And people will not look at your cold like it was professional and you might not get work. You, uh you have problems spotting some errors because when your code these horrible written really believe me, it's really hard to analyze its killed like that and to sport arrows. You will make errors because off chaotic coats also remember to focus on starting good habits from stop. Okay, So to sum up in this lecture, we've learned what are variables. Variables are containers that can called values, different types of values. But we'll talk about these types in future lectures. And we also learned that in order to safe the coat for later for re use for later usage, we need to create a file like, for example, this one. And after saving it, we can run it. We in our shelf. What school? This shell is interactive, which means it can have interaction with the programs that that were run, right and ah, that's pretty awesome because, well, you can create a new vory able like, for example, that and at five to it. And then you can print it out, right? You can work with the script that Waas run already. That's all. Good lesson. Thank you very much. 4. Comments: Hello. Our brother today we're going to talk about comments. Well, our comments comments are notes that you give to yourself or maybe another programmer that we look at your script in future so you can describe your coat, right? You can say what is happening under the comment about the comment or the left off government, whatever. How to create comments. You use that hash sign shift plus free will give you this, son. And after this sign, everything did you type is gonna be ignored by the python interpreter. OK, so this thing is not gonna be interpreted. You can just run their module and everything will work fine, right? You didn't get an error if you don't use it as you can see, you go now. Have some problems because the interpreter doesn't know what is that thing, right? You haven't assigned anything to it, so it's not a variable. You did something like that. It's gonna work fine. Okay. But otherwise isn't work. So in order to create comment, you put hash and then you can type something cute. So, for example, let's create simple program that will add two variables to each other, have to do it. Well, let's talk about it. Fires that say, uh, this program adds two variables and shows top some. Okay, So the A equals for example. Five big equals, for example for and some equals a plus big. And I want to see on the result the some of this on the outward. So we're gonna print it round module, okay? And as you can see, we have got nine here, so everything works fine. You can also at common after the line like that. Okay. So example Meribel named a very odd, bold named B. Of course I'm over doing it right now, but I'm just showing you how you can create. Come. The heart sign allows you to create single line common. If you want to come in more than line line, you need to do something like that. Diabolical, biblical and double coat. As you can see, the color off the code below has changed because everything things now is gonna be commanded. So it's gonna be ignored by the python interpreter. We need to finish it also by doing something like that. So after this, think everything is gonna be interpreted like normal, So I do something like that. It's gonna be interpreted Onley after this. Ah, this place, right? You can also do the same like that. We've using the single ah quote governments. Okay, so round module, As you can see, all these things were ignored. Total Onley things that are after are gonna be executed. Okay, let's go see, We have got to you free. Everything works fine. So this map comments are used to give notes to yourself or to other programmers. 5. Types of Variables: Hello, everybody. Today we're going to talk about basic types off variables and we also gonna talk about how we should name our variables. So our coat will look better for others and for us in future. Okay, So what type of variables do we have and what is type of a rape? Well, when we create ever able So we, for example, creative Rabel named a and we a saint to it. So we put into the fire Able value five. It means that we've just created a variable. That type is in teacher okay and teacher and in teacher and we can check it when run the program. And we use something with this called a command A function type on. We do something like that. We send there a the variable A to see the result, as you can see, will have as a result, int which means this in teacher it means that you can you have got now inside of it in teacher Very okay. We have also something will discolor float numbers and it means that that our numbers with fraction So, for example, free point 14 and this is called flowed numbers type I have to run demotion for salary. Hi. Be as you can see, it's flawed Now it's very important to notice that we've used the dot here. OK, we didn't use coma. We used that in order to create fraction we use that. Okay. So as you can see who could not free point sorting, we get also type that is called string. It is a sequence off characters so one character next to each other And in order to create string, we need to tie the name for rare able than the equal sign and then use the double quotes for single quotes and between them string the world that we want to put their. So, for example, we can pulled my name, our cat. And when you're on the module name, as you can see we have got now are cardio. Ah, that's working. But we can also do it with the double courts. As you can see, you can do it My date too. But what's the difference? Well, if I wanted to, for example, create a sentence right, and I would say I am for all in Poland. As you can see, this thing got interpreted and we can now five sentence and I have got I'm from Poland to you. But have you used a single called Our Interpreted? Doesn't know where we start or where we end this string This sequence of characters, right? Because he's like hate. This started here and added, Here, What is that? Things after it. So A Z, you can see we can. If you want to use the single up a stroke in the sentence in the string, then it's better to use the double calls. Or there is also another way toe. Do it by using, for example, backslash. When we use backslash, we are saying to the interpreter that this single quote is a single chord that we want to show. It's not a single quote that is used to open and string OK on a random module. As you can see, we've got the result. Probably when the type heres something like that, you noticed that the type off it is as the air. So it's string right, the sequence off characters. The next thing you should know is about bowling type. So there is a type is called booing. It can hold two states the true. And the falls, for example, is big. Yes, it's big, so it's too bull. Boeing went aground in module. Yes, big. You can see through into notice that we haven't used the quotes here, even though this think is working fine. Right? Uh, when we use quote, it's no longer bowling type around the program, you can see we have got here, the single quotes added. And when we do it like that, we have good information that the type is last year, which is string. So that works only for true and false. And it's very important for you to know, concedes Bull um that you need toe have here the first letter speak okay to be large if you do it that way in Strathcona even work because false is not defined. It's like we are right now. Trying toe assign toe is big variable ever able that is called false. But false was not declared. Okay, So as you can see, the pipeline language is case sensitive. Every single letter is very important, which means when we create a variable that we call A and we signed to it for and around the program on DWI type your small A, huh? As you can see, we have got five. When the type big bang larger, we have got four. So this is no the same variable. Okay, Because we have got here different case off the letter. So it's very important because you might make some mistakes because off that in future, be ready for that. So the pipe in this case sensitive It's very important to also know that when you're creating names, they should be self descriptive. What does it mean? It means that when you look at the name of a rebel, you should already know what is inside of it. So, for example, sighs off section. So when I'm looking at it, it means that this thing is gonna hold the size of section. If I could name need for example G, I wouldn't know. What is that? Think describing, right? And believe me, you should for on the start try to name your names like that. Okay? The good Hobbit To save you tones off time and the next thing notice that every word that I started in this variable I started with the large letter O s. It's easier to read the code like that. Because if I do it that way, as you can see, I need to focus for a second longer. Maybe. Maybe second. Doesn't matter you to focus longer where the next world is starting. Okay? No, it is better to do it dead way. Every new word Did you start ever work? You start inside. The rebel name should be capitalized so they should start from the large letter. So two to mop. The types of rebels describes what is inside that very favorable. It's good idea, toe create self descriptive name off the rebels. And also it's good idea to start every words inside the name of a Rabel with the big letter . That's only a lesson. If you have any questions, it's always feel free to ask 6. Math Operators: hello about it. They were going to talk about arithmetic operators. So we're gonna talk about operators that are commonly used in math. So the operators that work on numbers plus sign can add two numbers to each other. So four plots six will give you 10. The sub tract can subtract two numbers so you can say nine minus free is going to be six. Multiply can multiply numbers so multiplied by four is eight. It's very important that in order to multiply two numbers you should use that asked the risk sign. OK, you shouldn't do something like that because this is a syntax error. It's involved syntax because X is, you know, it can be very able, right, the name of a Rabel. But X is not something like multiply operator. OK, I know that the muff in schools you learned that X issues for multiplying, but in when you're using computers, when you're using python, you gonna use the Asterix sign. In order to divide the numbers, you should write the slash. It's also work to notice that when you divide two numbers, the result off to in teachers when you divide two integers is float number, right, Because you have got here the dot here to that zero. Even though you do not need to rise zero, As you can see, that zero was written, which means that this is the fault number. Okay, There's also something good is called parentheses. I am sure that you've met with them. They can change the order off. What is what should be calculated first, right, So you can get something like that to plus four multiplied by free. You need to know that in March this thing won't will not be executed. First, you were first multiply for by free, which is 12. 12 plus two is 14 right? But there are times when you want to change the order off execution off what should be evaluated first. So now the computer sees the parentis is here, and this thing will be executed 1st 2 plus four is 66 multiplied by free is 18 right, So that's how it works. There is also a very cool operator doesn't exist in other programming languages, and this operator can raise the number to the power off the number that is on the right side. So when you do something like that, too. Race to the power of free. It will be called to eight because in order to write to the power of free, you need to multiply this thing by itself. Three times so so multiplied by two is far. Four multiplied by two is as you can see. The result is a so everything works fine Free, Multi writes of the power Off to Is nine, because Free multiplied by free is nine right free 27 free movie Piper Fees 99 multiplied by three is 27. That's how it works that school because other programming languages in other programming languages, you cannot use the operator. You have tow import some library in order to raise the number two some kind off power. Let's talk now about the floor division when you use that want slash. So the typical division when you divide nine by two as the reason you gonna get the 4.5 of the float number. But when you use the floor division, you will get the number that this here on the left. Always. So even if you did something like 13 divided by, for example, nine as you can see. The result is gonna be one when you do 70 divided by non 17 floor with floor division is gonna give you one. So you do know draw around up or the result. Right? But always run it down. Okay, That's how floor division works. Well, floor is at the bottom, right? So you look down, okay? You have got also something. Will this called model operator? It's called the remainder operator. It shows you what is left after division. So it takes this part into consideration. So when you do something like 13 model you nine we got as a result for and you're like a But this is not this thing welcomes. Not exactly this thing. Ah, well, the truth is that four divided by 90.44444 When I was talking about that, we're looking at this part. I I was saying that we're talking about this thing here. So I was talking about the number that is in the counterpart, not in the dominator, but the counter. The thing in the fraction at the top is called counter. And the thing that is at the bottom off fraction is called Dominator. Right? So let's training a bit when you have, for example, one divided by free. The result the 0.33 fearful figure. Right? And these think is the counter and this is Dominator. So if I did one multiple free, I would get is the result one and I do go to a model of free. I would get as the result, too. Right free model of free, huh? What will be the result of this? It will be zero because free divided by free is 1.0, right? It means that there is no remainder. There is nothing left after division. But when we do something like four divided by free, we have got to hear still reminder. And we only look at this reminder that this reminder is really what one divided by free. Right? So four multiple free is really one. Because it is what was left here, right? One was the counter off dominator. Five model free is really to six. Model of free is zero and so on. So five Model two is really one. Why? Because five divided by two is two. And how and the half is really something like one divided by two, which is the half right? And this is the hard that we are looking at the counter, So one model toe would be one. So that's why five Modelo two is one and it might look a bit complicated. It start when you're looking at it and you might be also like But why do I need it? Do not worry Right now I'm not able to show you how we could use it because you do not know what are conditional statements. But you should notice that the thesis behavior repeats to model free to free Modelo free zero. Right? As you can see, we have got here from the result one model of free one to model of your toe free Maduro free zero and it will after four it will go again one to and the gain zero. So these behavior repeats right? You have got the same always value here. But that value here is changing and you can use it because ah, you can change the way your program works every three times using the instruction like that in future. When you learn the conditional statements, you will be able to check if the result off some operation like that is equal to one. Then you can, for example, change the background off the table to Rhett. If it's equal to two, then changes to black one is equal to zero, then changed to green. Another again. Rat block. Green, red, black, green, red, block green. You can do something like that. I know that it might be a bit confusing right now. I just wanted to tell you that something like that has got a meaning. Do not worry. We did not understand it right now. I'm sorry. If I have confused is you do not worry about it. Just you should right now. Just Len, how this operator works back because I know that might seem like it's not useful. But believe me, this operator is one off the most useful operators in programming. You can do many useful things with it. The during the lesson. Thank you. 7. Exercise: adding VAT to products: and over about it. Today, we're going to practice the things that we have learned so far. So arithmetic operators and of arriba. Let's imagine a situation like that. You are in Europe and you need to pay taxes like, for example, value added tax that is added to the product. The tax is called that from value added tax. OK, so this tax is added to the product and we want to add the stocks to the products. Like what? Like, for example, shoes and, for example, TV, whatever. So let's create for able that we hold the price without the tax, the price off shoes and that's assigned to it 100 price off TV and that's assigned to it. For example, 2000. And the prize we've up talks is called Net Price. Okay, like that. And now we will create variable that we hold the gross price. So the price with the value added tax and it okay, so it equals to what 100? And now, for example, multiplied by one 25. Okay, let's imagine that we've just added 25% to the shoes on the price, and this is divided right and Well, this works. But why shouldn't we reuse the very variable from here? It's good idea to reuse it right like that. Let's now use the sheep loss Home Control. Please see and enter counter policy. As you can see, short skirts are really impressive and they can be helpful. And now let's do something like that that no, that's changed net to Gross. And we need the price of TV. And now it works. Fine, right? We've just weaken Run the program, Onda. We can ask for the gross price of shoes. As you can see, it works fine and gross price of TV. Everything works fine. But ah well, the VAHT, I think, should be in another of Arabe. Why? Because let's imagine that we have got lots of Arabe als. Well, the truth is, that right now the valley for the shoes and TV, we put it manually here, Right? But the truth is that we would probably retrieve these values from database and wield Retief give for example, 100 variables. Well, 100 values like that or maybe more, maybe 2000. Imagine that. This program is enormous. And one day ah, somebody The change devote from 25 to for example 20. Can you imagine yourself changing each line? Imagine that You have got your laws off lines right there, right? With laws off lines and you have to have changed from 25 to 20. OK, you should You could probably use some editor to do it for you, but it will be so. I'm profession long, right? You repeat yourself. So when the times that's not a good idea. That's why you can create another variable and hold inside it. For example There what? The actual over 25 for example. So oh, how toe now and do something like multiplication like that Let what we could do something like that one plus 25 divided by 100 right? 25 divided by 100 is really zero point went if I so we can do something like that And the problem is that well, this thing is equal to 1.25 like before. But there is an order off what should be multiplied first, divided first or added first. The order right now is like that. You do this thing then you did this, think and then you add the result from this. So this and we do not want it to work like that. We need to change the order using parentheses. So we gonna do something like that. So just change the order, right? And, well, now we can run the program. And as you can see, it works fine. And the cool thing is that when somebody now changes, they've got to, for example, 20. We can just change it in one place and they see the works fine. Even though we had many girls prices here, Great. The next very important thing you should. And no. Is that when you see something like that. So when you see the repeated many times, even even two times, right, But imagine that the calculation like that is repeated here 1000 times. So every time your computer needs to divide and at the result of these division toe one So it takes time. This this thing will never change. Right? That expression here or my DVD, Maybe we wanted to change it. We would need to change it never every possible place. So it would also take lots of time we could just create another. Were able calculated that, for example, like that. And now, as you can see, our program with see Ron. Fine. So girls price of shoes. But the cool thing is that the calculation is done on Lee ones here and you say you star the calculation inside were able right. So we started in your memory in the ram, in the room, the random access memory. Is this why you need rum? You start there, the variables and you can access this. Ah, more and the time you want without having to count again to calculate this thing again. Just calculated once and then you reuse it. So imagine that you have got here, As I have said earlier, many times, lines like that and because you did it here, not hear. Every time you need to calculate it, only one and you just reuse the value. That's why variables are so good and also even wanted to change somehow. The calculation. You will do it on Lee here once. You wouldn't need to do it so many times. So every time you feel like you could change the calculation that these done many times is a good idea to create a variable. Right? Okay. It was looking like that. So there's only good lesson. I suggest you to create a few more products and calculated the girls price of the product as the exercise. Remember, you should exercise after each off lecture. You should do the same things that I did in the lecture. Remember? You will never be a programmer. We've all practicing. Okay, That's only good lesson. Thank you very much. 8. Semicolon and ENTER - assigning multiple values to variables at once: hello we have learned so far did, in order to create a Rabel and assigned to it the first value we need to type the name off variable than the equal sign, then the value that we want to assign. And that's all. We can run the program, and we get the value from to the very people. But what if I want to create more than one variety? So far, we've been creating it like that. We hit the enter button, then the name of a rebel, the name of a Rabel and their value for the next right. But what if you wanted to do it in one line? Well, then, if we do something like that, you will notice that we have go invalid syntax error, which means that something went wrong because the syntax is rock. Why it's wrong. Why our computer are why the interpreter that interprets that coat cannot see that this is just another very able to create when you hit. Enter the enter sign so the new line is interpreted by interpreter that it is the end off instruction. The instruction has just ended. Okay, that's why it works. But when you do something like that in order to tell the interpreter that you have finished the instruction already. You need to type something. What? This calls him calm, saying something like that and then it will work. You can add the space here so it looks better. And now when we type X, why that as you can see, the values were assigned properly. Now you're probably thinking why I added the cynical and here and here. But I didn't. It it here because it works like that interpreter is gonna assign toe x five and then he will not is the teary semicolon. So the next the things that are after the semi column are gonna be interpreted as the next instruction. And then why equals still he not? This is the semi column, and then the Z equals well. And you do not need to add the semicolon here because, well, it's just not needed because you don't have any other instruction after it. So semi column is really an enter for the interpret interpreter. So it is the sign off a new line. Then you have just finished the instruction. Okay. When you delay did think that Britain would be like, Hey, let's assign toe x five and then assigned toe It also spies. Why? And something like that is like, Why? Well, I wait a second. I don't know what you want to do. You okay? You need to inform him. Hey, this is the end of instruction. So that's one way. And also I will Did you, in this lesson how to assign the pipe and way many variables in one line? Because it's pretty simple in fighting you fight and you can just do something that a comma being comma see, he calls. And now when I type for example, one coma to come up free, one will be a same toe to will be. Think Toby and free will be a saint Toe, foot sea that school, right? And I think it's ah faster to write and easier to read. But what? This girl you can even assign here for examples string So test and, for example, here bull value and we'll also work. Fine. Great, right. So the types doesn't need to be on the same If you want a toe A sign to each off the variable the same value you could write a dead weight, but well, it doesn't look so good. You can do it in the pipe. And even better, you can write something like that. Okay, That's only good lesson. Thank you very much. 9. Assignment operators: Hello, everybody. Let's imagine a situation like that. We have got ever able X and the value of this variable is fight. And now I would like to increase X by two. So how to do it? Well, right, Something like that. X equals exports to And now when they run this program, you will notice that as the result we have got seven. How does it work? Interpreter Always look at the right side when he sees the assigned equal sign. OK, so when he look here, you look at something like that X with this X is like that. What s acts? Oh, I have to look. And both where the eggs was declared. Okay, he's here and he is looking at it and he says that it's five. So he changes the extra five and then he has good five plus two here, and he needs to make a month operation and he changes it into seven. And then after that expression, after this thing was evaluated, eat that seven will be assigned two weeks. Okay, That's how it works. That's why we can just write, execute and we can increase the value that was before X by, for example, to end. We will also lend a shorter way to ride this thing weaken. Just write something like X plus equal sign, too. We'll take this under the comments that this will be ignored by interpreter and now winning Randa module. As you can see, it's still seven. So this operator is a short way of writing the expression that looks like that so you can use it with any other operator like, for example, minus. Which means that far we'll have five minus still, and that's the result We have got X. We can multiply by two or, for example, free. Free, multiplied by five is 15 and as a exercise, go on and try other shut way off writing the longer expressions like that, they're doing that lesson, Thank you very much. 10. Playing with Strings (Slicing, adding and having fun): Hello, everybody. Today we're going to play with strings. We're gonna lend how toe at Sprink another string and how toe slides them and how to create big strings that are long. Okay, So let's start from creating a single thing, for example, name. And let's put their my name on a cat. Let's create another variable. Let's call it last name and that's put them my surname. So for dark and now I would like to print both at once. So my full name at once. So I need to create another variable and put inside name. And now how Toe ed name to last name. We need to use the operator, plus so something like that. And now we can print the full thing. Like As you can see, it's working Fine. But hey, there is no space here. There is no space because Well, I didn't Eddie, there is no space here and there is no space here. We called ad space like that, but that's not a good idea, because what if I wanted to print it later? Without that specs, right? It's best at this pace here. How to do it Well, in order to create space. We go not do something like that. So double coat space double quotes. So we just end it a spice between the name and last name, using their plus signs and no one around your model. As you can see, we have good space here, so it works fine. What if I wanted to create a very long streak? Like, for example, this is a tax that was stake in from somewhere And thats no cup it, and separated, as you can see, is long. It's how to read. It's good idea to when you have a string like that Teoh somehow you know at the Ender. But there is problem. As I have said, High Tone thinks that enter is end of destruction and how toe do something like that. Well, we can, for example, use the backslash. Backslash is gonna inform your interpreter that the text has not finished yet. Okay, so like that. And now when they're on the module, everything works fine. That's one off the way. There is also one more. You can use comment here. That's funny, because when you're on it, as you can see, it's working fine. But there is small difference a Z can see. We have got enter in the place where we put it hero, because he this is a tax that waas and we hit the enter here and we have got also here. Enter right when we did dead way. As you can see, every foot thing was in one line. There's a difference, and you might be also why you could assign comment to the variable. Well, interpreter. When he sees that comment is assigned to variable, it's is then not ignored. It will be interpreted like if it was a long string. That's how it works, OK, so if you do not assign the common and where it means that it is the common one big note. Otherwise it is just a long text. Okay, now let's learn how to slides strength and believe me, it's very useful. For example, you want to check very often. If the first letter is big, it is capital life. Or sometimes you want to check if the 1st 3 letters are equal to something. Believe me, it's very often used when you are gonna program in future. So how to do something like that? Well, the first thing you need to know is that when you have got text, you start counting from zero. So the first Lecter is at index zero second at war Index one. So it's always minus one, right? The last letter, the six letter is at the Index five and what is funny? Imp item. You can count from back in other languages. Mostly, it's not possible, so you can put minus one and you can come from the end. So how to use the information that we have just left? We can do something like that. Use the square brackets and access the first index. So the first letter that this at the zero position when I ran the program. As you can see, we have got here now thing because this is the first letter. Okay, Face value with name. As you can see, it's a if I want to access the last letter. I can just type something like that minus one. Great. It's zing when I want to actus every letter bother the 1st 1 I can do something like that. So when you add the column here like that, as you can see when you don't get to stop at the left side. Anything you would get the entire string. But when you put one on the left side, you'll get everything. Part of the first letter Ive you put here one what will happen? As you can see, we have good Onley First letter. So everything upto index one right? So if I put you five, we have everything upto index 5012 free Sam and it's concede it's five But I said upto five and we need toe at the world, not including the fifth Element. Ok, uh you can also do something like that. Mine is one which will mean that Do you want to actus everything but lost a limb? Everything but no last two elements. So not including last two elements You might be like how to remember it. Well, you don't know the need to worry about remembering it because every time when you're gonna want to use it, you can look it up on the Internet Or you can play with the simple string like that and just get how it works, right? Not right when you do something like, for example, that from one to free what we we get are and key. So let's look you 01 So from position 12 to and free so to the second position or to third position, not including that hurt position the not worry if you cannot memorize it because believe me , even I When I want to slice drink, I always rely on it by putting simple strength here in the beytin and trying to see how it works. Really, The most important for you as a programmer is to remember that that you can do something like that, that it's possible to slice string, right? The thing that you have to remember how we have works is that you can access each element like that. So the first element, the second, the lemon, the third element is very important for you to remember. Did you come from the zero, not from one right. And it's also very important for you to know that in order to access the last element, you need to type minus one. So you understand these two things you are ready to go and every time when you want to act is more than one element, you can just really do not worry. It's not so often used. Body are is very useful. You will see when you start programming. And the cool thing you need to know is again when you run the program. The module in Piketon. You can still access the full name here. Right? And you can now do something like that. I want to access the last 11 right? So I want to access full name minus one. That's an exercise. Create variable link and do something like that, Http. And now type here, for example, the domain that you want to access. And now check if the link starts with http. You do not know how to check. You don't know how to make conditions yet. But you know now how to slides. That's drink. And get that http right. And in future, you will learn how to condition how toe check. If that sliced string is equal to death, that's that way you can later in future track. If somebody types http or he hasn't time, right? That's all. Your lesson. Thank you very much. 11. Importing libraries - basics: Hello, everybody. Today you're going to learn, I think probably the most important topic Inp item Which is how toe import libraries and what are functions. So far, we have learned that there is something, what this cold print. And I told you that it is a command. It is a function. So it is something that will execute some instructions that were created by other programmers. So the truth is that when you write print, your computer is looking somewhere for the print name for the print function, and it will execute the instructions that are responsible for printing the think that dissent between this rockets to the out. So here, right, that's how it works. And there are many, many, many, many more like that. So in order to create toe use function, you need to write the name of function, and then the parent is, is so that brackets here. Okay, it's very important. It means that you are invoking the function and you need to send their an argument something like that, and it can detect it can be number. It can be variable can be many other things that we will talk about the future lectures. Also, For example, when I do it like that, you will see my name. When I do it like that, you will see here the four. Okay, so it works Fine. But Oh, is that all? Is it only one function like that? No title is enormous. You will see some Why? When you go to that dogs that bite in that work you'll notice that we have been to do something good despite on standard library which you can use freely for free. There are, like many libraries, each library. Did you see here? That m s I l i b g r p p W d. Whatever you see here has got lots off inside functions. So Commons, like print that you can use for free. Let's go to, for example, something like math You not is that we can use here. For example, seal we can I come? For example, the square root off the number, the descent and someone. There are some complicated trig automatic functions toe whatever It's already been programmed. You do not need to reinvent the wheel. You can just use the work that was done by somebody as what is more cool you in future when you become programmer, when you learn how to create functions, you can also share functions like that with others. Well, this girl, when you go here to the pipe and package index, there is right now above 124 thousands of packages available for you for free that were created by community. So by people like you in future, you can just use it. And now you might be Do I need to learn all these things? I thought that you might be like that. That start No, The short answer is now you do not need to learn all these things. And believe me, I do not know even 90% of them. The truth is that you just need toe learned how toe look as a programmer for the information. Okay, So when you are in need for something, you need to know how to look through these things. And you need to know how toe Reedus, crip, shins off functions. So when you read description like that, you can instantly see that that function will return the square root off X. Also, I just need to write something like that and I will get the square root of X, that's all. That's how you learn functions. And the truth is that you do not need to remember off them. You just need to remember that they exist. That's good idea to remember that they exist. And when you need something like that, you wouldn't know where to look because it's not possible toe. Remember every possible function. There is thousands of them, and people create each day. New one, right. So it will be just impossible to remember off this. Okay, we are calm now, so let's use some other functions. There are some building functions, So why functions that you do know the need to import? For example, these a be us. It will return the absolute value of a number, which means that if you give it for example for will return for you, give it minus toe. It will return you to sew it. You always return the positive number. It will just change the negative numbers into positive numbers. That's all. That's how it works. And it's often use, really, believe me. And this is one of the building functions, right? We can also use something with this cult help you can send to help. For example, a B s and you'll instantly see how dysfunction works. So you do nothing to remember As I have said, how it works, you can just send to help the name of function and you will get the information how it works. Great, isn't it? And well, there are some did you need to import like, for example, the math. You cannot do something like that Math square road off, for example. For as you can see, math is not defined. You need to import it. In order to import it, you need to write import and then name off the library you want to import. And now, since the shell is working right below, you can use below this comment. You can use the math library. You can know, right muff dot and, as you can see, would have gotten out too. You need to remember that you must write math before it being toh also access that metal using their dot here. Okay, you cannot write something like that because this method is not defined. It's really important that even if you have imported the math library. You still need to use the dot here. If you don't want to use the dot operator, you need toe imported other way, going to type something like that from month import and then the name of function you want to import from. And now when we type it like that, it would work. But what is fun? It will not work when we do something like that. Uh, it's working because we have imported it here. Okay, Um, let's ah, arrest. Restart the shell. So I do something like that. Restart the shell and again when I dough like that, As you can see, I got four. But now I do something like that. It will not work. So there's being worth because I use the import math here. You need to remember that there is a shell state, right, and everything from that place is gonna be remembered. So I have forgotten about Did we have imported the math already here, And that's why it still worked here. But, uh, here we didn't work, as you have have noticed, right? Okay. You can also for the school, as you start the shell again import every possible function like that from math import and we news need to use the asterisk. Asterisk means that I want to import every function and now I can use. For example, the ceiling function seal is apt op. When you look up top in your room, you will see the seal, right? So it will always move the number up, as you can see from for it. Move it up. So it is running always up. It doesn't matter what is written here. Do always run it up. As you can see, we have got always as a result for five and I can use easy now these function also right because we have imported every function from math. Ah, using this construction. If you had used that construction, you would need toe eat right each time math before the name of function from so you get toe so you would have to write math that seal mapped out square root. Right. So to sum up, in order to invoke function, you type the name of function and then you send an argument so that will be somehow interpreted by the instructions that you do not know how they work and you do not need to care about it because it was already written by somebody. You can just reuse the coat just by typing the name off the function. And that's great because you do not need toe re invent the wheel. You can just use the work off others. And what this girl in future when you become programmer, you can also create functions we were and how to create functions in future. And you can help others, right? You can create library like, for example, in the fight like that and somebody asking, imported and he can use it. So the module that five here is really some kind of library right now. It's nothing, you know, great, because you could just we just know how to create variables and make some simple math operations on them part In future, we will know how to create great things. That's only the lesson. Thank you very much. 12. ATTENTION - important lecture about common mistake regarding functions: hello today are we show you something that will help you avoid mistakes that are made by beggars. Look, we have got here have a Rabel name and we assign to it. Joan and I would like toa enlarge every letter. So I would like to have here Jay Oh, age. And instead off the small letters like that how to do it? Well, we could write it on our own right now. We don't know how to do it because we don't have, you know, molded for it. But we can use the function that already does it. Why should we reinvent the wheel when we can use something that can do for it? And there is a function that is called upper like that and this function increases their string. But this function is a bit different because you use it like that. You use it on string, this building function you don't need to import anything. So you do stuff like that. Name that upper and it will take it will enlarge all the letters here when he ran the module. You will see as the result nothing. Why? Well, because when interpreter cease a line like that he is going toe. Go to the definition off the upper function and he's going toe execute every instruction that will enlarge these letters here. And after he executes all the instructions, he will return here. We've there value like that. So he did the job and he returned it here. He just replaced this entire line with something like that. And when you rounded module, the result is the same because we have not used the print. When you use the print, as you can see, it works fine. We can now also do something like that. And we are. And it will also work fine. And John. Right? But still, let's see if we had changed the name variable. But as you can see, we haven't changed. These very we have just printed Jonah Que There's all we we just printed out the John here , that's all. OK, we haven't done something like that. Name equals John. Now we have both Jones with in large letters. Even we did it dead way. Oh, yeah. Then we have replaced what was inside the name with the Children like that. Okay. And the I hope that now you understand how it works. You should now exercise that big, we think cited. So there are many more functions like that. For example, lower. If you had used lower, it will make all letters that are inside the name small. And there is also something called the sculpture cop. Pity lies. Things spelled like that. Oh, he's not. It's been like that. I apologize. This function increases its in urging the first letter. But all others, uh, our mate smaller, right? So that's how the capitalized function. So you have just lent freeing functions upper, lower and capitalize. But the most important thing is you know how functions work when the functions invoke. So when you use the parentheses, the interpreter goes, summer executes every possible instruction that will make what the function shouldn't do. And then it returns to the place off invocation place like that and return something like that. Okay, it is very, very important to understand it, and because otherwise you might make lots off mystics because off it. So that's a good idea now for you to exercise a bit, make of a Rabel called thing with your own name and play with it like I did. They're telling the lesson. And always, if you have any questions, feel free to our 13. Taking data from user and type conversion (casting): hello With each