| Total Complexity | 0 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import random |
||
| 2 | import sublinput |
||
| 3 | |||
| 4 | attempts: int = 1 |
||
| 5 | target: int = random.randint(0, 100) |
||
| 6 | n: int = -1 |
||
| 7 | |||
| 8 | while int(input("Enter a number :")) != target: |
||
| 9 | print("You were too", "high" if n < target else "low") |
||
| 10 | attempts += 1 |
||
| 11 | |||
| 12 | print(f"You found the number within {attempts} attempt(s) !") |
||
| 13 |