Session Ready
Exercise

Decisions with Boolean operations

Boolean operations are used in Python to make decisions. Imagine that you work as an analyst identifying accounts that might potentially participate in stock trades. You might use this information to advise qualifying clients on market moves. The variable is_investment_account is supplied. It is set to True if the given account includes stock positions as part of it's holdings. The supplied variable balance_positive is set to True if the account has a positive cash balance, which could be used to purchase securities.

Instructions
100 XP
  • Print the value of the variable balance_positive.
  • Set the variable potential_trade to True if the account is an investment account with a positive balance.
  • Print the True if this is a potential trade.