Posts

Types of data in PYTHON

Image
Data Types Sets :  A Set is an unordered collection data type that is iterable, mutable and has no duplicate elements. Python’s set class represents the mathematical notion of a set. The major advantage of using a set, as opposed to a list, is that it has a highly optimized method for checking whether a specific element is contained in the set. This is based on a data structure known as a  hash table . The Syntax of the set is :  Define: a={Elements of set} Example: a={1,2,3,4}       print(a) Warning: Please, always maintain the Indentation, as Python is too much sensitive about the Indentation(maintain the braces in  the  program Step by Step) Otherwise it will Throw  an  Error:  "Indentation Error". Tupples :   A Tuple is a collection of Python objects separated by commas. In some ways, a tuple is similar to a list in terms of indexing, nested objects, and repetition but a tuple is immutable, unlike lists which are mutable. Th

Getting Started With Basics ....

Image
Basics of Python Let's start with the usage of 'print' function, the syntax of the 'print' function is : print("Text under this will be Displayed ") the basic definition of print is : print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile: a file-like object (stream); defaults to the current sys.stdout.\nsep:string inserted between values, default a space.\nend:string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream. The above definition of print you can get by entering docstring and flexibility of python print function ,syntax to get info of any function that used in the python is by using the docstring, we can get to know about the parameter that can used or should be passed through a pre-defined function. The syntax for "Docstring" keyword is : print

Write Your First Python Program

Image
Let's keep it Simple, Start Writing Your First Program : Open Your Pycharm and open a new file as python 3, it will look like : If you are using it the first time, you may get the error Interpreter path is not Defined  Now, let us give it a solution, In "Pycharm" go to the setting or use (Ctrl+Alt+s) key to open the settings. Then, go to the project and set the path of the python interpreter Close the setting after applying the setting. Okay, now you are done let us start writing your first program. Just open a new file as "Python 3", it will look like this :  Give it a name as My first program. Let us start by printing "Hello World !!", as it is the most basic thing you can start with any language. Its simple, just write the code:                                                    print("Hello World !! ")   and run the code from the tab or use the key(Alt+Shift+F10) and see the output it will print as "Hello Worl

Introduction to Python

Image
 It is an interpreted high-level programming language for general purpose programming. Python features a dynamic type system and automatic memory management. It supports multiple programming paradigms including object-oriented programming, imperative, functional and procedural and has a large and comprehensive standard library. like Django, beautiful soup etc. So the main question arises why python when there are several other languages to learn and work on? Why python? Python is simply a much cooler language. It is very easy to code. Anyone can learn python syntax within a day. It's easy to read. Being a high-level language one can easily understand the code simply by reading it.  Being an Open source language one can download it not only for free, but its source code is available to public this, means you can edit it, change, it use it and distribute it too. There are various modules according to user needs. That is it exhibits a huge amount of library. Pyt

The First Step Towards the "PYTHON"

Image
Try downloading python from the site below mentioned (i will recommend you to download the latest version of it,i.e., python3.6 ) : https://www.python.org/downloads/ After downloading go through the .exe and try to install the python and go through custom setting and install the pip as well it will further help to add up the additional modules like bs4 and many other                                                                             Or Download the anaconda python, use the superior jupyter (i have started with this one because it helps me to make my e-notebook)                                                                             Or Work with idle (basic one close to python)                                                                             Or Try installing pycharm, now i prefer it more than anyone of the option. Because its really intelligent u find it once u start using it