Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
Archit669 committed Feb 1, 2024
1 parent 0c8ae23 commit 2f15d57
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions archit/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,6 @@
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}")

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
Expand Down

0 comments on commit 2f15d57

Please sign in to comment.