PYTHON BY ARUN




Python Tutorial


Python is a interpreted, high-level programming language
Python can be used to create simple and complex programs.
it is a language similar to spoken English

* It was created by Guido van Rossum, and released in 1991
* Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc)
* Python used for Web Development, Software, Mathematics, Scripting, Machine Learning, Data science, AI and so on.

The Most common question by Freshers are:

1. How Should I start learning Python for Data Science?

2. How Fast can I learn Python?

3. What topics need to cover in Python for Data science.

Oooh MG!

There are plenty of resources to learn python for free. As far as I know if anyone has an interest in to coding can learn the same. You have to do practice every day. If you are coming from a non-it sectors then you have to practice a lot

The very best way to learn Python is practice –

Every person IQ is different hence its takes time as per the person. If you know any other language then it mite be easy to understand. So the learning time mite be lesser compared to the other person.
If you have any programming experience (e.g. PHP, Perl, JavaScript, C#, Java, etc) I'd start with Learn Python The Hard Way (by actually coding)

If you are very new to the programming or coding, I prefer to go through a live mentor class or even you can refer the YouTube or reading materials that completely depend up on the person how fast he/she is learning. Some may learn by reading and some by watching videos.


I will add some referral links that might help for the beginners:

Video links: click on the heading to direct to the site

1: Pyhton Tutorials for Absolute Beginners in Hindi

2. Python tutorial for Beginners(with Notes) English

3. Python for Beginners| Full Cource

4. 100 days of Python Programming

5.Exercise on Learn Python the Hard way live demo by Braton Poulson


Website links:




Books:

Data Science from Scratch: First Principles with Python 1st Edition

Python Programming a practical approach by Shashwat Pathak
PYTHON 3 THE HARD WAY



PYTHON COMPLETE BASICS


Requirements: PYTHON, IDE, CMD OR TERMINAL

 The software can be downloaded from the official website:

Python: Welcome to Python.org 

You can download the software as per the operating system and you can now download the latest version Python 3.11.1 scroll-down and select the correct one.

Python documentation: docs.python.org, here you can find the official tutorials also.

IDE:- lot of ide's are there, as per your convenient you can choose the desired IDE 

Some ide's are: Anaconda- Jupiter notebook (For beginners), PyCharm, Visual Studio and so on...


Here I will provide the Jupiter notebook with complete basics of the PYTHON 

By this you can practice the same to understand 


First printing "Hello World"







Commenting 





Strings in Python: 




Python variables

Python Variables - Assign Multiple Values






#One Value to Multiple Variables







#Python - Output Variables

The Python print() function is often used to output variables.






In the print () function, you output multiple variables, separated by a comma:






You can also use the + operator to output multiple variables:







Notice the space character after "Python " and "is ", without them the result would be "Pythonisawesome".

In the print() function, when you try to combine a string and a number with the + operator, Python will give you an error:







The best way to output multiple variables in the print() function is to separate them with commas, which even support different data types:







# Global Variables

Variables that are created outside of a function (as in all of the examples above) are known as global variables.

Global variables can be used by everyone, both inside of functions and outside.

Example Create a variable outside of a function, and use it inside the function












If you create a variable with the same name inside a function, 

this variable will be local, and can only be used inside the function. 

The global variable with the same name will remain as it was, global and with the original value.













Also, use the global keyword if you want to change a global variable inside a function.









I will have added these links as I used to learn Python

I will also add some more in my up-coming post

Note: Used referral links from other sources for the materials and video links


Will add the other parts also and will continue to learn 


NOTE:  DO PRACTICE EVERY DAY FOR 1 or 2 HOURS 


Practice makes men perfect remember this quote. 





                                                            BASICS OF PYTHON


Python is a popular, high-level programming language that is easy to learn and use. 

It is widely used in various applications, from web development to scientific computing and artificial intelligence. 

This blog post is a beginner's guide to the basics of Python, providing you with a good foundation to start coding.

First, let's take a look at the syntax of Python. 

The language is known for its simplicity and readability, with its code being much like English. 

This makes it easier to write and understand, even for those new to programming.

One of the most important features of Python is its use of indentation to define code blocks. 

Unlike other programming languages, Python uses white space to determine the structure of code, making it easier to maintain.

Variables are used to store values in Python. To declare a variable, simply assign a value to it. For example:

makefile
x = 5

In Python, you can use different data types such as integers, floating-point numbers, strings, lists, dictionaries, and more. 

To check the data type of a variable, use the type() function:

python
print(type(x)) # Output: <class 'int'>

Another important feature of Python is its use of operators. Operators are symbols that perform operations on variables, 

such as addition, subtraction, multiplication, and division. For example:

makefile
y = 3
z = x + y
print(z) # Output: 8

Conditional statements, such as if/else, are used to control the flow of a program. For example:

python
if x > y:
print("x is greater than y")
else:
print("y is greater than x")

In Python, you can use loops to repeat a set of statements. The most common loop is the for loop, 

which is used to iterate over a range of values or a list. For example:

scss
for i in range(5):
print(i)

Finally, functions are blocks of reusable code that can be called multiple times. 

To define a function, use the def keyword, followed by the function name, arguments, and a colon. For example:

python
def add(a, b):
return a + b
result = add(3, 5)
print(result) # Output: 8

These are just a few of the basics of Python. 

With its simple syntax, powerful features, and large community, Python is a great language to start learning. 

Whether you are looking to build your own website, automate tasks, or explore machine learning, Python is a great choice. 

Happy coding!

Comments

Popular posts from this blog

CA - VARIBLES AND COMMENTS IN PYTHON