Category Archives: Programming

Python with Mathematics and Sequences – PART 1

Sequence is a particular order in which related things follow each other. Its fun and its very intuitive and so called logical. So lets start.

NOTE: Here we are not going to discuss what are different types of sequences are. We will see how we can achieve different sequences using Python.

Geometric Sequence

In a Geometric Sequence each term is found by multiplying the previous term by a constant.

2, 4, 8, 16, 32, 64, 128, 256, …

This sequence has a factor of 2 between each number. Each term (except the first term) is found by multiplying the previous term by 2.

Continue reading Python with Mathematics and Sequences – PART 1

Guidelines for young python developers – PART 2 | Fun with happy coding

NOTE: This part is independent and doesn’t require PART-1 to be referred compulsorily, but its advisable 🙂

Extended Slicing

Slicing in Python is a mechanism to select a range of items from Sequence types like strings, list, tuple, etc.

Syntax: [stat:end:step]

>>> L = range(10)
>>> L[::2]
[0, 2, 4, 6, 8]
mylist[::-1] # will reverse a list

# Reverse a string
>>> S = 'Abhilash'
>>> S[::-1]
'haslihbA'

Continue reading Guidelines for young python developers – PART 2 | Fun with happy coding

Guidelines for young python developers – PART 1 | Things you should know being a programmer

There are many things that we could consider under this subject. My motto is to make you aware with some of the important features, methods and pythonic stuff that you could refer from here and then do more Google for advanced learning. I will just give you a start.

NOTE: I consider you to be a Python developer. If you are just starting with Python, then I guess this post will become confusing for you. You could go through for quick reference on what to read next when you are done with your first Python tutorial.

Python is cool. Its trending and its obviously self-intuitive. Learning curve with python is awesome.

Continue reading Guidelines for young python developers – PART 1 | Things you should know being a programmer