Lesson 10 of 34

and, or, not: Conditions കൂട്ടിച്ചേർക്കൽ

8 min 25 XP

and: രണ്ട് വശവും True ആണെങ്കിൽ മാത്രം True. or: ഒരു വശമെങ്കിലും True ആണെങ്കിൽ True. not: True-നെ False ആയും False-നെ True ആയും മാറ്റുന്നു.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

ഒരു യഥാർത്ഥ ഉദാഹരണം: ഒരു ജോലിക്ക് യോഗ്യത നേടാൻ degree-ഉം കുറഞ്ഞത് 60% marks-ഉം വേണം.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

Range പരിശോധിക്കാൻ Python-ൽ ഒരു shortcut ഉണ്ട്: 18 <= age <= 60

Challenge

+25 XP

input() ഉപയോഗിച്ച് ഒരു വർഷം വായിക്കൂ. Leap year ആണെങ്കിൽ Yes, അല്ലെങ്കിൽ No print ചെയ്യൂ. നിയമം: 4 കൊണ്ട് ഹരിക്കാവുന്നതും 100 കൊണ്ട് ഹരിക്കാനാവാത്തതും, അല്ലെങ്കിൽ 400 കൊണ്ട് ഹരിക്കാവുന്നത്.

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.