if avggrade > lettergrade "aelse if avggrade > lettergrade "belse if avggrade > lettergrade "celse if avggrade > lettergrade "delselettergrade "fif avggrade > lettergrade "aelif avggrade > lettergrade "belif avggrade > lettergrade "celif avggrade > lettergrade "delselettergrade "fbut as more and more conditions are nestedthe structure becomes more complex and the blocks continue to be indented further and furtherwhich can make it difficult to read the code python provides third form of the if construct that can be used to implement series of conditions or multiway branchesas shown above on the right the else part can be omitted if there is no default part to the multiway branch the ifelifand else clauses must be aligned to the same indentation level repetition constructs there are many occasions when we need to execute one or more statements multiple times until some condition is met for examplesuppose we want to compute the wages for number of employees given the number of hours each worked while the wage computation is the same for each employeeit is has to be performed for multiple employees thuswe can have the computer repeat the data extraction and computation for each employee until the data has been processed for all employees python has two repetition constructswhile and for the while loop loops can generally be categorized as either count-controlled or event-controlled in count-controlled loop the body of the loop is executed given number of times based on values known before the loop is executed the first time with eventcontrolled loopsthe body is executed until some event occurs the number of iterations cannot be determined until the program is executed the while loop is general looping construct that can be used for many types of loops consider the following count-controlled loopwhich sums the first integers by repeatedly executing the body of the loop timesthesum initialization while < condition thesum + + modification print"the sum ="thesum