<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def num_columns(self):
 """Number of columns displayed."""

        if self.term.is_a_tty:
            return self.term.width // self.hint_width
        return 1