In this complete Python course with notes, I'll teach you Python from the very beginning to the very end. I've included my handwritten notes with this
... [Show More] video so that you can do revision wisely after the video. I'd like to tell you that this video, source code & notes are all absolutely free of cost. If you think this video is great, hit the like button and let me know in the comments "This Python course is helpful". VScode & Python are currently installing - we'll work when the download finishes. Visual Studio Code is like an advanced Notepad, providing extra features to make your programming easier. You can also write ``pip --version'' and it will display your pip version. You might be using Linux or Mac, but you can use any computer or OS.
Python is a powerful way to give instructions to the computer that allow it to understand exactly what task you're trying to perform. It works like pseudo code and is very readable, so there's no excuse not to learn it! Python is a high level language, meaning there's no need for memory management like with C and C++. It's built for people who just want to focus on their work, and Data Scientists and Machine Learning enthusiasts can benefit from its features. Python can be used for Data Science, Machine Learning, Game Development, and website development. To create a program with a name of your choice, you can install extensions in Visual Studio Code. With Python, you can unlock the power of the computer and create amazing things!
We've installed Python & VScode and we've put our complete setup here to do the code. Now we'll dive deep into the code we've written & into the Python language. What is the meaning of this & how can you write your own code? Let's take a look at 'built-in modules' - these are modules which are pre-installed with the installation of Python, such as 'Flask', which is used to build websites. Our first Python program consists of any name, just make sure it won't clash with the built-in modules, for example don't name a file 'ABC' or 'Flask'. With the help of pip, which is a package manager for Python that you get by default when you download the Python, you can install packages. There are two types of modules in Python - Built-in Modules & External Modules. Now let's write our very first Python program and say 'I've been walking on your steps'!
Python can be used as a calculator. We can input any valid Python code into Repl and it will execute each line as it reads them. As our code grows, it becomes harder to manage in Repl, so we write Python files. In Python, comments are text that you want to include in the program but do not want to execute. To call a function, we use open and close parentheses (). When you press 'Enter' after writing `` exit() '', you will be exited from your Repl. This was a brief overview of how to use Python as a calculator. This chapter was about Repl and I hope you enjoyed it. If this is your first program ever, please leave a comment below and I will help you with the practice set for chapter one which I have created for you. Our program will print the poem "Twinkle Twinkle Little Star" and we will name it "twinkle.py".
The take away from this is that you can write a paragraph which occupies more than one line in single-quotes. You have to write the string as you write and never use double quotes (`` ``). Whenever you have a string which is occupying more than one line, you can't write it in double quotes. If you want the product of two numbers, then you must use (*) as a product sign; this is a rule followed by many programming languages. For example, if I add 5 * 1, then the answer is 5. We can do things which we haven't learned yet with the help of modules; for example, I didn't know how to play .mp3 files in Python but was able to do so with the help of the 'playsound' module. Similarly, using the OS module, we have to print the content of a directory and I was able to print a table of 5 using this module.
Chapter 1 notes and practice sets are available on the website. In Chapter 2, we cover Variables and Data Types. Variables are names given to memory locations in a program and can be used to store any data from music or songs to string literals like ''harry'' which is written with double quotes. Floating point numbers like 345 are written without double quotes. Data Types refer to the type of container used to store data and there are many keywords in Python that are reserved words and should not be used to create variables as it can lead to a broken program that does not function properly. Let's move back to the notes!
Python is an incredibly powerful language, as it can automatically identify the type of data we put into it. For example, if we assign a variable with the value 71 (a = 71), Python will recognize this as an Integer. Similarly, if we assign a variable with the value 88.44 (b = 88.44), Python will recognize this as a Floating Point Number. We can also assign strings to variables by enclosing them in either double quotes ("Harry") or triple single quotes ('''Harry'''). This is especially useful when including single or double quotes in a string, as Python will not mistake them for the end of the string when using triple single quotes. Furthermore, Python will alert us to any mistakes we make in our code, allowing us to quickly identify and fix errors.
There are some rules to name variables in Python Programming Language. A variable name can contain alphabets, digits and underscores ( _ ), it can only start with an alphabet or an underscore ( _ ) and cannot start with a number or @ symbol. For example, if you name a variable as (_a) it will work but if you replace it, then it will throw a syntax error. There are 4 types of common operators in Python: Arithmetic operators, Assignment operators, Comparison operators and Logical Operators. If you write a variable with uppercase and the second one with lowercase then they will be considered as two different variables and they won't be regarded as the same variables. The value of 3+4 is 7. If you write something like '3+4', then the value '3+4' will be printed out. I'll provide all the necessary programs, PDFs, ZIP files and practice sets for your convenience. So don't worry about it - just stay with me in this course and enjoy - you don't even need to take notes as I'm providing them all for you!
In Python Programming you can use (-=), (*=) or (/=) as a shortcut to multiply or divide the original number by 12. Comparison Operators compare two entities and tell us if the statement is true or false, while Logical Operators like 'And', 'Or' and 'Not' are used to operate on Booleans. For example, if 14 = 7 then it will return 'False', but if 14 != 7 then it will return 'True'. Many of you have asked me in the comments how I quickly comment out lines, so I use Ctrl + / for this, which can also be used to uncomment. Don't forget about Type Casting and Type Functioning either, which involve using 'And' and 'Or' - remember that when either one of these is true it will return 'True'. In Hindi, this is referred as 'Ya'.
Your Python interpreter is asking you, "What's wrong with you? Why are you trying to add an 'int' to an 'str'?” Instead of trying to add them together, it is better to do type casting. This means changing the type from 'int' to 'str' so that they can be combined successfully. [Show Less]