Decision making in Python

Prediction of conditions in a program and specifying actions to be taken for each condition is called decision making.Python evaluates expressions  that give True or False as output. For example, if your score in Mathematics exam is above 90, then your grade is A. If your score is greater than 80 and less than 90,... Continue Reading →

User Defined Functions

A function is nothing but a piece of code that does some task. This piece of code can be reused whenever required. Functions are of 2 types : 1. Built in functions 2. User Defined Functions. Built in functions are those that are inbuilt and come as a part of a python library. User defined... Continue Reading →

Tools to write Programs

We have seen the basics of Python in the previous blogs. Hope you have followed the previous blogs. Now let us see how to write programs and let us look at things that need to be noted while writing programs.  A python file has a .py extension. For example: myfirstprogram.py     If you are using... Continue Reading →

Loops

We have learnt about strings and lists. Now let us learn about loops. We use loops when we have to perform a particular action repeatedly. There are two types of loops in python- For loop and while loop. For loops iterate over a given fixed number of elements in a fixed definite sequence.    In... Continue Reading →

User Defined Datatypes – Typedef

It is a keyword, with the help of this we can put another name (alias)  to the existing data type. Syntax : typedef oldname newname; Example : typedef int rollnumber; //this a valid to compiler typedef int char; // this is not valid Here newname should not be a keyword means not known to the... Continue Reading →

Powered by WordPress.com.

Up ↑