DECISION MAKING IN PYTHON

DECISION MAKING IN PYTHON

Many a time, in our life, we are in situations, where we need to do something, on the basis of some condition. Like if there is a holiday, go out for a trip, or if there is a sale in the mall, do some shopping, and so on. But the thing is that we are doing something, on the basis of some condition, like if there is a sale, then only we are doing some shopping. Similar to this, we have some situations in our programs as well, when we need to do something on the basis of some conditions.

So, now we are going to explore what we can do in such situations. Here is an insight into what we are going to cover here.

  • Simple if else statements
  • The if elif statements
  • Nesting of if statements