Lesson 10 of 34

and, or, not: शर्तों को जोड़ना

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.

असली उदाहरण: नौकरी के योग्य होने के लिए डिग्री और कम से कम 60% अंक चाहिए।

Example: edit me and press Run

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

Python में दायरा जाँचने का छोटा तरीका है: 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.