Passed
Push — master ( 0606ef...1f0523 )
by Yohann
01:16
created

guess_the_number   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 10
dl 0
loc 13
rs 10
c 0
b 0
f 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