Category Archives: Python3

Python 3 for Beginners

List of posts: Section 1: Introduction to Python 3 Installation of Python and IDE Basics of Syntax and Data types Variable and print() function Input(),len() and Slice  Type conversion Conditional Statement and Loops Function Global and Local scopes of Variables Practice programs Section 2: List data type

Welcome Future Pythonistas!!

This story is all about Python 3. Do not hesitate to start your journey with Python 3 just because you haven’t learnt Python 2. Those are not sequel stories. One can enjoy the ride with Python 3 without Python 2. Trust me that is never a blocker.  However we will check out differences between Python… Read More »

Installation of Python and IDE

Download and Installing Python: Navigate to https://www.python.org/downloads/. Check whether your system is of 32 bit or 64 bit. Download respective packages of your OS. I am explaining here for windows. Click on the downloaded file(.msi). Install it to C:\Python3.x.                                 … Read More »

Python Basics- Syntax and Data types

Before proceeding further Let me remind you that “Errors and Mistakes are Ok when you are in the process of learning. It’s fine for amateurs to experiment So don’t be afraid to try all possible ways.” Let’s get familiar with Python Syntax structure: 1.Indentation in Python. Indentation means spacing. There will not be any curly… Read More »

Examples of Expression evaluation

>>> 2*3+9 15 Above precedence order is  * > + >>> 2*(3+9) 24 Above precedence order is () > * > + >>> 10*2+4/2 22.0 >>> 10*(2+4/2) 40.0 Nevertheless expression in braces always takes the first priority!!

Variable handling and print() function

Going further I want you to type the programs in your installation. I feel typing program will enhance our process of learning. Do not copy rather type and execute it in another possible combination for that particular logic/program. Let us see basic declaration of a variable: If you are familiar with any other programming language… Read More »

input(), len() and Slice operation

input() function: Necessity of input function comes when you want to get some text from user. So it will wait for the user to enter some text. Have a look at below program. In line 2 we are prompting user to enter a name, here we are using input() function. In line 3 we are… Read More »

Type Conversion

To write a good program you have to handle all the possible cases in the process of development. I need to get an input from user which needs to be an integer but user provided a float. How Python or programmer is going to handle such cases. So the topic is mainly of  Type conversion. What… Read More »

Flow control

Programming is about making decisions depending the results obtained. Its about checking and verifying whether certain conditions are met or not. In any programming language we have loops which serves this purpose. Before going to start with loops I would like to revisit comparison operators. These operators will result in either true or false .… Read More »

List Data type

Till now we have not seen data types which holds multiple values. Let us start with such data types: List, Tuple, Set, Dictionary and Frozen set List: What? List is a sequence data type in Python. One can store items in the list which are of different types as well. Why? In day to day… Read More »