Skip to content

Nil369/Akash_Python_Notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python_Notes

1. Introduction:

Python_img

Python is a high-level, versatile, and easy-to-learn programming language. It is known for its simplicity, readability, and the vast community support it enjoys. Python's syntax allows developers to express concepts in fewer lines of code compared to languages like C++ or Java. This makes it an ideal language for beginners and experienced programmers alike.

Installation & Getting Started

Steps to Install Python:

1. Visit the official python website: https://www.python.org/

  1. Download the executable file based on your Operating System and version specifications.

  2. Run the executable file and complete the installation process.

  3. After installation check the version of python by typing following command: ‘python --version’.

Starting Python:

Python_img

Open Python IDE or any other text editor of your preferred choice. Let’s understand python code execution with the simplest print statement. Type the following in the IDE:

print("Hello World !!!")

Now save the file with a .py extension and Run it. You will get the following output:

Hello World !!!

Installing Packages:

1. To install packages in Python, we use the pip command. e.g. pip install "Package Name"

  1. Following command installs pandas package in Python

pip install pandas

This is how a python syntax is written. Which is very easy to remember/ write than other programming languages like C, C++, Java

Note: Comments in Python => # (single Line) || """ """ (Multiline)

These comments are used in the source code to make notes in the Source Code itself. Refer the Source Code after getting brief of the important topics to learn in Python

2. Quick Reference

1. Variables and Data Types:

Variables are used to store information that can be referenced and manipulated in a program. Python supports various data types including:

Integer (int): Whole numbers without decimal points.

Float (float): Numbers with decimal points or in exponential form.

String (str): A sequence of characters enclosed in single or double quotes.

Boolean (bool): Represents truth values, either True or False.

List: An ordered collection of items, which can be of any type.

Tuple: Similar to lists but immutable (cannot be changed).

Dictionary (dict):A collection of key-value pairs.

2. Control Structures:

Control structures are used to control the flow of execution in a program.

Conditional Statements (if-elif-else): Used to execute different code blocks based on conditions.

Loops (for, while): Allow repetitive execution of a block of code.

3. Functions:

Functions are blocks of reusable code that perform a specific task. They help in organizing code and making it more modular.

4. Object-Oriented Programming (OOP):

Python is an object-oriented programming language, which means it supports concepts like:

Classes: Blueprints for creating objects with attributes and methods.

Objects:</b? Instances of classes that encapsulate data and behavior.

Inheritance: Allows a class (subclass) to inherit attributes and methods from another class (superclass).

Polymorphism: The ability of different objects to respond to the same method call in different ways.

5. Exception Handling:

Exception handling allows the program to respond to unexpected events or errors gracefully, preventing them from causing the program to crash.

6. File Handling:

Python provides tools for reading from and writing to files. This is crucial for working with external data sources.

7. Modules and Packages:

Modules are Python files that contain functions, classes, and variables. Packages are directories of modules that provide additional functionality.

8. Libraries:

Python has a rich ecosystem of libraries that provide pre-written code for various tasks. For example, NumPy for numerical computations, Pandas for data manipulation, Matplotlib for data visualization, etc.

9. Built-in Functions:

Python comes with a set of built-in functions that perform common operations, such as print(), len(), range(), and many more.

10. Working with APIs:

Python can interact with web APIs to send and receive data, making it a powerful tool for tasks like web scraping and working with online services.



Remember, the best way to learn Python is by practicing and working on projects. Start with simple programs and gradually tackle more complex tasks as your confidence and proficiency grow. Happy coding!




Refer My Python Source Code for better understanding of the concepts

Exercises Icluded :

► Exercises have been included for your practice and better grasping of your concepts

PROJECTS INCLUDED :

► 5 COOL & INTRESTING PROJECTS have been Included to make you understand the uses of Python Programming, How vast & usefull Applications and real world problems could be solved using Python 😁

► The Projects are :

1. Robo-Speaker :

This project basically takes user input and speaks it

2. Weather App:

This project tells real time temperature in any city

3. Image Resizer:

This project basically reduces your images size, dimensions to its half => 50% without effecting the quality. For demo I have included my image in it try it 😁

4. Pdf Merger :

This projects basiclly shows you how to use python to merge as many number of pdfs You want. You can use this project as backend with some few customisation & using django or flask You can make a real world pdf merger site available on internet 😀😀

5. Drink Water Notifier for Windows:

This is a very simple drink water every hour to remain hydrated reminder project

About

This is my python notes. this will help you to refer any concept in python & it's useful for revising faster also

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages