Day 3 : Conditional and looping statements
Hello guys, Here we are, Day 3 🤟 Some of you are beginner and some of you have basic knowledge and understanding of python or any programming language. Each and every language have their own syntax. Previously on Day 2, we learn about variables, keywords, datatypes and operators. Let's dive into Conditional Statemts : Quick Note : Python relies on indentation (whitespace at the beginning of a line) to define scope in the code. Other programming languages often use curly-brackets {} for this purpose. 1] if statement : If condition is true then block will execute. Syntax: if <condition > : < statement > In the form shown above: 1. <condition> is an expression evaluated in Boolean context, as discussed in the section on Logical Operators in the Operators and Expressions in Python tutorial. 2. <statement> is a valid Python statement, if <expr>: <statement> must be indented. Example: ...