![]() Removing indentation, about getting exercise. Statement exactly one of two possible indented blocks is executed. ![]() ![]() In the if- else form this is followed by anĮlse: line, followed by another indented block that is onlyĮxecuted when the original condition is false. If heading and is executed when the condition in the if One, like in the simple if statement, comes right after the Again it isĬlose to English, though you might say “otherwise” instead of The middle four lines are an if-else statement. Temperature = float ( input ( 'What is the temperature? ' )) if temperature > 70 : print ( 'Wear shorts.' ) else : print ( 'Wear long pants.' ) print ( 'Get some exercise outside.' )
0 Comments
Leave a Reply. |