If/elif/else
elif
is used if the previous condition is not met, but the current one is.
12345678price = 999 if price > 1000: print('The price is high. I won't buy it') elif price > 500: print('I will think if I need it') else: print('I will definitely buy it')
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 3. Hoofdstuk 4
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Awesome!
Completion rate improved to 2.7
If/elif/else
Veeg om het menu te tonen
elif
is used if the previous condition is not met, but the current one is.
12345678price = 999 if price > 1000: print('The price is high. I won't buy it') elif price > 500: print('I will think if I need it') else: print('I will definitely buy it')
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 3. Hoofdstuk 4