Python: Boolean Statements - Review

Post Reply
User avatar
Jason
Site Admin
Posts: 853
Joined: Tue Jul 01, 2025 10:13 am

Code: Select all

print("Please guess in your head.  Are the Phoenix Suns basketball team from New Mexico?")

are_the_Pheonix_Suns_from_New_Mexico = bool(False)

if are_the_Phoenix_Suns_from_New_Mexico:

	print("No, the Phoenix Suns are NOT from New Mexico.")
	
else:

	print("The Phoenix Suns are from Arizona, not New Mexico")
	
# The else statement will always run due to this NOT being an input boolean statement.

 

POSTREACT(ions) SUMMARY

Post Reply