Python: Booleans and If Statements

Post Reply
User avatar
Jason
Site Admin
Posts: 809
Joined: Tue Jul 01, 2025 10:13 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.")

 

POSTREACT(ions) SUMMARY

Post Reply