Categories
Uncategorized

Data Types in Python

Hey Everyone !!
I hope everyone must be doing great…

Moving ahead it’s time for the next topic comes under Python that is “Python Datatypes“.


Sounds familiar right? Yes cause we have already discussed it in the previous topic i.e Python Variables.
Just a quick recap we have seen over there that they are also some specific values that we can be store in the container or in the variable, from the example we took that the basket of fruits can have different kinds of fruits like apple, oranges, pinapples, cheerys whatever as per your space demand and the need.
So, what are those, the different kind of fruits are nothing but the as Dataypes, and such datatypes that python supports are known as “Python Dataypes”.

Like we have discussed earlier we don’t have to decalre the datatypes before its usauage, it’s something that the python languauge does it for us.
One of the big advantage of it that no more we have to be worried about the storage cause previously in the other programming languauges we were not sure about the the reuirement of the memory as per the need which lead us to waste the ample amount of memory already.

So to prevent this here we are with the python languauge which saves us from wasting the extra memory.

let’s take one example:
>>> a=5
>>> type(a)

output will be class<int>
– type() is the function which tells us about the type of the varibale means that it tells us about the what kind of fruit is their in the basket.

another exmples:
>>> a=5.0
>>> type(a)

output- class <float>

similarly for other datatypes.

Different types of Data-Types available are:
> Text type: str
> Numeric type: int, float, complex
> Sequence types: list, tuple, range
> Mapping type: dict
> Set type: set, frozenset
> Boolean type: bool

NOTE: these are the very necessary and basic datatypes which everyone should know.
We look upon each other thoroughly the way we will be moving forward

Keep coding keep winning 🚴

Categories
Uncategorized

Comments in Python

How’s going everyone?

Hope you all practised how to write python syntax.

Let’s move forward with the next topic i.e, Comments in python:
Comments are descriptions that help programmers better understand the intent and functionality of the program.
They are completely ignored by the Python interpreter.

When working with any programming language, you include comments in the code to notate your work. This details what certain parts of the code are for, and lets other developers know what you were up to when you wrote the code. This is a necessary practice, and good developers make heavy use of the comment system. Without it, things can get real confusing, real fast.

Types of Comment:

1.Single-Line Comments

Such a comment starts with a hash character (#), and is followed by text that contains further explanations.
For example
# defining the post code
postCode = 490023

Single-line comment example

2.Multi Line Comments

Python does not really have a syntax for multi line comments.
To add a multiline comment you could insert a # for each line:
For example
#This is a comment
#written in
#more than just one line
print(“Hello, World!”)

Multi-line comment example

Or, not quite as intended, you can use a multiline string.
Since Python will ignore string literals that are not assigned to a variable, you can add a multiline string (triple quotes) in your code, and place your comment inside it:
For example
”’This is a comment
written in
more than just one line”’
print(“Hello, World!”)

Multi-line comment example no. 2

How to Write Better Comments?

1.Use comments to describe what a function does and not the specific details on how the function does it.


2.Try to remove as many redundant comments as possible.

3.Try writing code that can explain itself, using better function/variable name choice.


4.Try to make the comments as short and concise as possible.

Keep growing, keep Coding 😊

Categories
Uncategorized

Syntax of Python program

Good evening everyone !

Let’s begin with the first module or topic of python:

PYTHON SYNTAX-

Syntax stands for a predefined format or a particular manner only in which you can write it, the same way!
Same way we call such syntaxes which particularly python follows are called Python Syntax.

Since python is different in several ways in compared to others languages, So it’s not necessary that syntax is going to be exactly same to same. It differs on it’s own way.

As compared to other languages let’s talk about some basic syntaxes of python.

For example: print(“Hello World”)

Output- Hello World


Yes , it’s just a single line of code .

Points to remember:


1. You don’t have to end the statement with semicolon(;)
Here the new line shows the end of statement.

2. You don’t have to declare the data type of the variable like other languages, python do it by it’s own.

3. One major important thing which you need to focus more on is Indentation , Indentation is the space in between the left most margin and the character/ code written.
For example:
while(i>0):
print(“Indentation is correct”)

The output will be – Indentation is correct for every value of i greater than 0.

Now for second case if you’ve written the same code in this manner:

Example:
while(i>0):
print(“Indentation is incorrect”)

It would have shown output as some indentation error has been occurred.
Now you know the reason because of the indentation.

Indentation is mainly the space as 2 tabs, or four spacebars pressed.
It places the code in the correct space or simple if you enter just after the colons in the first line it will lead to the next line with correct indented space.

4. Also while saving a python file you should save it with .py extension.

To get familiar with this code more 🙂

Keep learning!

Categories
Uncategorized

Flow of Python🚴

Cheers coders!!
Let’s start it ~

So now we will dive into the depth of pyhton from here now onwards°

I always believe one thing that whenever you start something you should know the ending means when to stop and where.
So to make it easy for everyone and to give a clear visual regarding the python.

We will discuss the modules that what are the main modules that comes under python .

And under those modules what topics it consists of, so that you can know or can make a blue print that what we are going to do next.

*PYTHON*

-Python Syntax
-Python Comments
-Python Variables
-Python Data Types
-Casting
-Booleans
-Operators
-Data structures
-Loops
-Functions
-Classes/Objects
-Inheritance
-Iterators
-Modules
-Exception

Categories
Uncategorized

Best features of Python!

Hey guys,

It’s tough time everywhere and we hope you all are healthy and fine.
So we’re here with this new post,

Prime Features of Python.

As a programming language, the features of Python brought to the table are many. Some of the most significant features of Python are:

1.Easy to Code

Python is a very developer-friendly language which means that anyone and everyone can learn to code it in a couple of hours or days. As compared to other object-oriented programming languages like Java, C, C++, and C#, Python is one of the easiest to learn.

2.Open Source and Free

Python is an open-source programming language which means that anyone can create and contribute to its development. Python has an online forum where thousands of coders gather daily to improve this language further. Along with this Python is free to download and use in any operating system, be it Windows, Mac or Linux.

3.Support for GUI

GUI or Graphical User Interface is one of the key aspects of any programming language because it has the ability to add flair to code and make the results more visual. Python has support for a wide array of GUIs which can easily be imported to the interpreter, thus making this one of the most favorite languages for developers.

  1. Object-Oriented Approach

One of the key aspects of Python is its object-oriented approach. This basically means that Python recognizes the concept of class and object encapsulation thus allowing programs to be efficient in the long run.

5.High-Level Language

Python has been designed to be a high-level programming language, which means that when you code in Python you don’t need to be aware of the coding structure, architecture as well as memory management.

6.) Interpreted Language

Python is an interpreted language i.e. interpreter executes the code line by line at a time. This makes debugging easy and thus suitable for beginners

7.Highly Portable

Suppose you are running Python on Windows and you need to shift the same to either a Mac or a Linux system, then you can easily achieve the same in Python without having to worry about changing the code. This is not possible in other programming languages, thus making Python one of the most portable languages available in the industry.

8.Support for Other Languages

Being coded in C, Python by default supports the execution of code written in other programming languages such as Java, C, and C#, thus making it one of the versatile in the industry.
i.e, Cython, Jython, IronPython, RubyPython etc.

9.Large Standard Library

Python downloads with a large library that you can use so you don’t have to write your own code for every single thing. There are libraries for regular expressions, documentation-generation, unit-testing, web browsers, threading, databases, CGI, email, image manipulation, and a lot of other functionality.

10.Databases Connectivity

Python provides interface to all commercial databases.Ranging from simple Mysql, Sqlite3, Oracle to large Infrastructural databases.

Keep Coding:)

Categories
Uncategorized

Python’s Importance

Python in Today’s World🌍

Over the years, Python has managed to sweep into the coding world and have managed to reach the top. It is one of the multi-paradigm and high-level languages that is used by programmers due to its conventional features. Python has managed to dominate other programming languages such as Java, C, C++, etc. In addition to this, its object-oriented feature has made it even more accurate to deal with.

Companies Using Python:

Many companies do not even realize they are using Python across their organizations. For example, if a company is a “Java-only shop” but they use IBM WebSphere as a web application server then they have to use Python to script the server’s configuration! Python has a habit of getting in everywhere regardless of whether the usage is intentional.

  1. Financial institutions:

Python is widely-used across financial institutions, whether they are hedge funds, large banks or regulators (see “Government Agencies” section below).

a) Goldman Sachs uses Python and often asks candidates about their experience with the language during the interview process.

b) PayPal uses Python across their entire infrastructure and often writes great technical blog posts on packaging, optimization using C and configuring DNS.

  1. Large tech companies:

Large technology companies tend to be polyglot (use many programming languages rather than standardizing on one), with Python either as a primary language or the “glue” that helps all the other languages fit together. The following articles explain how these leading large companies like Uber, Twilio, Netflix and Facebook uses Python in their development stacks.

a) Uber’s tech stack contains a significant amount of Python, which they documented in a series of engineering posts.

b) Twilio uses Python with Django and the Wagtail content management system to power the amazing Twilio documentation as well as TwilioQuest.

c) Netflix uses Python throughout their organization to run chaos engineering tests and generally glue together the code from their high-functioning polyglot teams.

d) Python 3 at Mozilla explains how their “build system, CI configuration, test harnesses, command line tooling and countless other scripts, tools or Github projects are all handled by Python”.

e) Google uses Python extensively and officially supports it internally as one of their three core languages, the other two being Java and Golang. While Google likely has every programming language running somewhere in their infrastructure, Python receives priority support due to its core language status.

f) Dropbox is well-known for using Python across their application development, infrastructure and operations.

g) Facebook and Instagram use Python 3 at scale. They’ve been very vocal about successfully making the migration from the Python 2 world into Python 3.

h) A significant portion of Reddit is built in Python and it is one of the largest sites at scale to use the programming language.

  1. Government agencies:

Python usage in government agencies is widespread despite the reputation of agencies as stodgy late technology adopters. Organizations range from financial industry regulators like the SEC and CFPB, to intelligence agencies like the CIA, FBI and NSA.

a) The Consumer Financial Protection Bureau (CFPB) not only uses Python for running most of their applications but also open sources many of those Python projects for other agencies (or any organization) to use.

b) NASA uses Python extensively and open sources much of their software.

c) The United States Central Intelligence Agency (CIA) appears to be a huge fan of using Python in its state sponsored hacking tools.

d) The SEC uses Python and proposes organizations use Python to comply with regulations.

Categories
Uncategorized

Frontend(website homepage making)

This is the homepage I’ve made of official site Netflix!

Screenshot of homepage been made

It was fun doing it, so I thought to share it with you guys too!

You don’t have to worry or think much on this cause I’ve made this with very simple but some tricky and advance commands. It was really really fun doing this that’s why I would suggest that apart from back-end everyone should take a lil break and do something like this!

Why I’m suggesting you this?

– The answer is very simple and logical that we human sometimes gets so tired of repeating the same thing or pattern again and again that either we get use to of it or looses our interest on the same context. Henceforth we Humans are always been advised that we should try something out of our comfort zone.

Coding part

I’ve done the main content part in html file named “task”.

And used external stylesheet file that is”task1“.

Just to tell you the basics – html file is something where we use html tags which are predefined in nature, html file contains content which tells what data is going to be displayed on the frontend and in what format. It’s like when you open the file in browser the first screen which pops up to know what content is going to get displayed in that!

While in css file we decide or we style that how our content that is written in html file is going to look ! For example: we’ve written the code for button in html file now how that button is going to look in browser that we’ll style in css file such as background colour of button or button’s width, height, font size etc. Everything!

Will going to provide the code files in next post so that there I can explain it in much brief about the code being used !

Let’s code for a change:)

Keep coding!

Categories
Uncategorized

Why Python over other languages?

Voila Guys!

Hope y’all found our first post interesting. Here we are with the next one:

Starting with a simple question:

Why python?
Since we know there are a lot of other programming languages , then why should we choose Python over others.
What python has got for us that no other languages provide?

->Python is one of the most loved programming languages by developers, data scientists, software engineers, and even hackers because of its versatility, flexibility, and object-oriented features.
Although it’s a high-level language and can do complex tasks, Python is easy to learn and has a clean syntax. Therefore, its recommendable for both beginners and experienced programmers.

It has got many advantages like :
1) Presence of third-party modules
2) Extensive support libraries(NumPy for numerical calculations, Pandas for data analytics etc)
3) Open source and community development
4) Easy to learn
5) User-friendly data structures
6) High-level language
7) Dynamically typed language(No need to mention data type based on value assigned, it takes data type)
8) Object-oriented language
9) Portable and Interactive
10) Portable across Operating systems

Python provides its Application in vast number of fields, Some of them are :
1) GUI based desktop applications(Games, Scientific Applications)
2) Web frameworks and applications
3) Enterprise and Business applications
4) Operating Systems
5) Language Development
6) Prototyping

At last some popular organizations using Python :
1) Google(Components of Google spider and Search Engine)
2) Yahoo(Maps)
3) YouTube
4) Mozilla
5) Dropbox
6) Microsoft
7) Cisco
8) Spotify
9) Quora
and more.

I hope this helped you guys to clear your concept a bit!

Keep coding keep learning:)

Categories
Uncategorized

The First step( Learn before code)

Cheers folks!
Let’s start from the very basic I believe going forward steady and slow, step by step is something which keeps the interest going!

Since you can’t make the territory at once it takes time to build up but you can break or destroy it at once …

Such way practice is something which can make you stronger !

Here we start,
We will talk about from where does python came from?
Why it’s name is python ?
And
Who is the founder of python?

Why it is called as python?

-Python was named for the BBC TV show Monty Python’s Flying Circus.

What is Python?

-Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.

When python came?

-The programming language Python was conceived in the late 1980s,and its implementation was started in December 1989 by Guido van Rossum at CWI in the Netherlands as a successor to ABC capable of exception handling and interfacing with the Amoeba operating system.

There are several versions of python are present , the latest version is Python 3.8.0

This is the stable release of Python 3.8. 0. Python 3.8. 0 is the newest major release of the Python programming language, and it contains many new features and optimisations(Oct 14, 2019).

Who found it?

– Van Rossum is Python’s principal author, and his continuing central role in deciding the direction of Python is reflected in the title given to him by the Python community, Benevolent Dictator for Life (BDFL).(However, van Rossum stepped down as leader on July 12, 2018.)

                                      – Keep Coding, keep Learning

Categories
Uncategorized

The Journey Begins

Thanks for joining me!

Good company in a journey makes the way seem shorter. — Izaak Walton

post

Design a site like this with WordPress.com
Get started