hey everyone ,hope you will enjoy this post.
This post is all about Python programming language which is now most popular and widely used language.
what is python?
so basically, python is interpreted, high level, dynamic and general purpose programming language.
Created by Guido van Rossum and first time released in 9191.wikipedia
So a few days ago I was learning python and found it easy, simple,
and readable.
How to start with Python ?
first of all it is not a big deal to learn python now days we have multiple sources like some online courses and You tube and tutorial on many online platform. It is much easy to access all these things.
But after all that I am writing about Python in this post I just want to share my experience of learning python.
To be honest I really enjoy learning of python, it is one of the fun language.
Don't worry I am not going to make it tutorial hell!
start -->
step 1
so the step one is installing and all, you can do these things by clicking on this link python.org
step 2
In this step just learn few basics like syntax or other basics things, I know many of you having the doubt that what these basic things are?
so the basic things are like Data Structure and algorithm -
Built-in Data-structures:
Lists: Stores indexed elements that are changeable and can contain duplicate items
Tuples: Stores indexed, unchangeable elements that can have duplicate copies
Dictionaries: Store key-value pairs that are changeable
Sets: Contains unordered, unique elements that are mutable
User-defined Data-structures:
Arrays: Similar to Lists, but store single type of elements
Stack: Linear LIFO (Last-In-First-Out) Data structure
Queues: Linear FIFO (First-In-First-Out) data structure
Trees: Non-Linear data structures having a root and nodes
Linked Lists: Linear data structures that are linked with pointers
Graphs: Store a collection of points or nodes along with edges
Hash Maps: In Python, Hash Maps are the same as Dictionaries
Algorithms:
What are Algorithms?
Algorithms are rules or instructions that are formulated in a finite, sequential order to solve problems and get the required results. They give the pseudo code for problems and can be implemented in several languages as they are not language-specific.
How do you Write Algorithms?
Algorithms are generally written as a combination of user-understandable language and some common programming languages. They are commonly written down in steps however, it is not always necessary to do so. There are no distinct rules to formulate algorithms but you will need to keep the following points in mind:
1.Figure out what is the exact problem
2.Determine where you need to start
3.Determine where you need to stop
4.Formulate the intermediate steps
5.Review your steps
For example, if you have to formulate an algorithm to check if a student has passed in an exam or not, you can follow the given steps:
Step 1: START
Step 2: Declare two variables x, y
Step 3: Store the marks obtained by the student in x
Step 4: Store the minimum passing score in y
Step 5: Check if x is greater than or equal to y. If yes, then return “Pass” else return “Fail”
Step 6: STOP
However, you can manipulate the steps according to your preference. For instance, you can assign the values to the variables in step 2 itself rather than taking steps 3 and 4. This way, a single problem can have multiple solutions and it depends on the problem and the programmer to choose the most feasible and reliable solution.
So this blog is about the basics of python and I will cover more topics in another blog or maybe in this one.
so stay tuned
Got a question ? Please mention it in the comments section of this “Data Structures and Algorithms in Python” blog and I will get back to you as soon as possible.
you can connect with me on socials
Top comments (0)