Lesson 11 of 34
if-നുള്ളിൽ if: Nested Conditions
8 min 30 XP
ചിലപ്പോൾ ആദ്യ ചോദ്യത്തിന് ഉത്തരം കിട്ടിയ ശേഷമേ രണ്ടാമത്തെ ചോദ്യം ചോദിക്കാനാകൂ. അപ്പോൾ ഒരു if-നുള്ളിൽ മറ്റൊരു if എഴുതുന്നു, 4 spaces കൂടി ഉള്ളിലേക്ക്.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.ഏത് else ഏത് if-ന്റേതാണെന്ന് indentation തീരുമാനിക്കുന്നു. ഓരോ if-ഉം അതിന്റെ else-ഉം ഒരേ നിരയിലായിരിക്കണം.