Python Programming/Strings Tutorial

String There are three ways you can declare a string in Python: single quotes (‘), double quotes (“), and triple quotes (“””). You can use quotation marks within strings by placing a backslash directly before them, so that Python knows you want to include the quotation marks in the string, instead of ending the string there. Placing a backslash directly…

Continue Reading →

Errors and Exceptions in python

Catching exceptions Whenever a runtime error occurs, it creates an exception object. The program stops running at this point and Python prints out the traceback, which ends with a message describing the exception that occurred. Ex→ dividing by zero creates an exception: >>> print(55 / 0) Traceback (most recent call last): File “<pyshell#0>”, line 1, in <module> print(55 / 0)…

Continue Reading →

Introduction to NumPy

Numpy NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran code useful linear algebra, Fourier transform, and random number capabilities Why NumPy? The standard Python data types are not very suited for mathematical operations. EX-→ Suppose we have a list.…

Continue Reading →

Installing Django and creating your first project

  If you have already installed Django, you can skip and jump directly to Creating your first project. If you haven’t installed Django yet, here is a quick guide to installing Django for local development. Django works well with Python versions 2.7 or 3.If you are not sure if Python is installed in your computer, you can verify it by…

Continue Reading →