Use of statement of Python: Use of if – else statement:-if – else is the variation of if statement. We attach condition with if statement if given condition is true then if block code will executed and if the given condition is false then else block code will executed. The syntax of if – else statement is given below:- if condition: Statement 1 Statement 2 else: Statement 3 Statement 4 Write a program in python to check the given number is even or odd. n=input(“Enter a number : ”) if n%2==0: print “The number ”,n,”is even” else: print “The number”,n,”is odd” Use of if-else ladder:- In Python language the switch statement is not worked. In Python we use if-else ladder in spite of using switch. The syntax of if-else ladder is given below:- if condition1: Statement 1 elif condition 2: Statement 2 elif condition 3: Statement 3 >br> else: Statement 4 Write a program in python to find greatest number in three numbers. a=input(“Enter firs
What is python What is Python: - Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Python was developed by Guido Van Rossum in the late eighties and early nineties at the National Research Institute for Mathematics and Computer Science in the Netherlands. Features of Python:- Less line of codes than other languages (fast execution) Platform independent Open Source Object Oriented It supports functional and structured programming methods It can be used as a scripting language or can be compiled to byte-code for building large applications It provides very high-level dynamic data types and supports dynamic type checking It supports automatic garbage collection It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java How to start the Python? First of all install the Python 2.7.12 on your system. After installation it will create a directory in C: drive named Python27. In Python27