How ‘else’ statement is different in 'if statement’ and in 'looping'?
Answers
Answered by
0
Answer:
There is no such limitation to the IF statement loop. ... A WHILE statement loop will execute much faster than an IF statement loop in applications where the loop is placed many commands into a program. Consider, for example, a loop placed at the end of a very long program.
Answered by
0
Answer:
if BOOLEAN EXPRESSION:
STATEMENTS
All lines indented the same amount after the colon will be executed whenever the BOOLEAN_EXPRESSION is true.
Here is an example:
food = 'spam'
if food == 'spam':
print('Ummmm, my favorite!')
print('I feel like saying it 100 times...')
print(100 * (food + '! '))
Similar questions