# Part 4 mini-project: Number Guessing Game -- starter. # # Finish this file so it plays a game of "guess the number". # See the chapter page for the full spec. # # Run with: python projects/03-number-guess/starter.py import random # TODO: pick a random target between 1 and 100 (call random.randint once). # TODO: declare an attempts counter, starting at 0. print("I am thinking of a number between 1 and 100.") # TODO: write a while True loop that: # 1. increases attempts by 1, # 2. prompts for a guess and reads it via int(input()), # 3. uses if/elif/else to print "Too low.", "Too high.", or # "Correct! You got it in N attempts.", # 4. exits with break when guess equals the target.