Lesson 7 of 34

তুলনা: True না False

6 min 20 XP

দুটি value তুলনা করলে Python উত্তর দেয় True বা False। এদের Boolean বলে।

Example: edit me and press Run

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

= value রাখে (assign)। == জিজ্ঞেস করে “এরা কি সমান?” (compare)। দুটো গুলিয়ে ফেলবেন না!

Strings-ও তুলনা করা যায়, কিন্তু capital letters গুরুত্বপূর্ণ: "Chennai" আর "chennai" সমান নয়।

Example: edit me and press Run

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

Challenge

+20 XP

price = 499 এবং budget = 500। প্রথম লাইনে print করুন price budget-এর চেয়ে কম কি না (<)। দ্বিতীয় লাইনে print করুন price 500-এর সমান কি না (==)।

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