- 2

The meaning of ( elif )

I still not really understad the meaning of ( elif ), can somebody explain to me.🙏🙏🙏

12th Oct 2021, 2:14 AM
Cheang Zi Yi
Cheang Zi Yi - avatar
2 ответов
+ 3
It's short for: else if
12th Oct 2021, 2:24 AM
Slick
Slick - avatar
+ 1
While you are using if statement and if you want to make use of else part more than once then you can use elif which is abbrevated as else if . An example : If you are writting a program for making grades and you want to give grades if marks>80 as A grade and marks>60 as B grade and marks >40 as C grade and else fail the you can make use of elif for B and C grade . HOPE THIS ANSWER HELPS YOU😊😊😊
12th Oct 2021, 5:35 AM
SIDDHARTH A
SIDDHARTH A - avatar