Python: Booleans and If Statements
Posted: Fri Oct 24, 2025 5:42 am
Code: Select all
print("Are the Orlando Magic a basketball team?")
are_the_Orlando_Magic_a_basketball_team = True
If are_the_Orlando_Magic_a_basketball_team:
# Interpreted: Does the Boolean variable are_the_Orlando_Magic_a_basketball_team say that that the team is indeed a basketball team?
print("Yes, they are a basketball team.")
else:
print("No, they are not a basketball team.")