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.