print("your admission cost is $ " elseprint("your admission cost is $ "the if test at tests whether person is under years old if the test passesan appropriate message is printed and python skips the rest of the tests the elif line at is really another if testwhich runs only if the previous test failed at this point in the chainwe know the person is at least years old because the first test failed if the person is less than an appropriate message is printed and python skips the else block if both the if and elif tests failpython runs the code in the else block at in this example the test at evaluates to falseso its code block is not executed howeverthe second test evaluates to true ( is less than so its code is executed the output is one sentenceinforming the user of the admission costyour admission cost is $ any age greater than would cause the first two tests to fail in these situationsthe else block would be executed and the admission price would be $ rather than printing the admission price within the ifelifelse blockit would be more concise to set just the price inside the ifelifelse chain and then have simple print statement that runs after the chain has been evaluatedage if age price elif age price elsew price print("your admission cost is $str(price"the lines at uvand set the value of price according to the person' ageas in the previous example after the price is set by the ifelifelse chaina separate unindented print statement uses this value to display message reporting the person' admission price this code produces the same output as the previous examplebut the purpose of the ifelifelse chain is narrower instead of determining price and displaying messageit simply determines the admission price in addition to being more efficientthis revised code is easier to modify than the original approach to change the text of the output messageyou would need to change only one print statement rather than three separate print statements if statements