code in listing can be written using if-else statement as show in listing listing if-else statement ifelse pyuse if-else to check even and odd nubmer "inputcommand takes input as string xint(input('enter the number:\ ') is used to calculate remainder if % == print("number is even"elseprint("number is odd" ''output- st runenter the numbernumber is even output- nd runenter the numbernumber is odd '' explanation listing line takes the input from the user after that remainder is checked in line if condition is true remainder is zerothen line will be executedotherwise print command inside 'elsestatement (line will be executed if-elif-else in previous casethere were two contions which are implemented using if-else statement if there are more than two conditions then 'elifblock can be used as shown in next example further'if-elif-elseblock can contain any number of 'elifblocks between one 'ifand one 'elseblock listing checks whether the number is divisible by and using nested 'if-elsestatement listing if-elif-else statement #elif pychecks divisibility with and "int(input())command takes input as number =int(input('enter the number:\ ') is used to calculate remainder if % == #check divisibility with if % == if % = then check this line print("number is divisible by and "elseprint("number is divisible by only"print(" % " % elif % == #check this if % is not zero print("number is divisible by only"elseprint("number is not divisible by and "print(" % " % print(" % " % print("thank you" ''(continues on next page control structure