(self)
| 111 | |
| 112 | print("Example 5") |
| 113 | def next_guess(self): |
| 114 | if self.secret is not None: |
| 115 | return self.secret |
| 116 | |
| 117 | while True: |
| 118 | guess = random.randint(self.lower, self.upper) |
| 119 | if guess not in self.guesses: |
| 120 | return guess |
| 121 | |
| 122 | def send_number(self): |
| 123 | guess = self.next_guess() |