diff --git a/archit/guess_number_fixed.py b/archit/guess_number_fixed.py new file mode 100644 index 0000000..8e91eec --- /dev/null +++ b/archit/guess_number_fixed.py @@ -0,0 +1,27 @@ +import random + +guesses_made = 0 +name = input("Hello! What is your name?\n") + +number = random.randint(1, 20) +print(f"Well, {name}, I am thinking of a number between 1 and 20.") + +while guesses_made < 6: + guess = int(input("Take a guess: ")) + guesses_made += 1 + + if guess < number: + print("Your guess is too low.") + + if guess > number: + print("Your guess is too high.") + + if guess == number: + break + +if guess == number: + print( + f"Good job, {name}! You guessed my number in {guesses_made} guesses! But this line is way too long!" + ) +else: + print("Nope. The number I was thinking of was {number}") diff --git a/archit/pyproject.toml b/archit/pyproject.toml new file mode 100644 index 0000000..20eb46e --- /dev/null +++ b/archit/pyproject.toml @@ -0,0 +1,18 @@ +[tool.black] +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist +)/ +''' +include = '\.pyi?$' +line-length = 88 +target-version = ['py36', 'py37', 'py38'] \ No newline at end of file