Nov-19-2019, 09:58 PM
(Nov-19-2019, 09:44 PM)jefsummers Wrote: Let's clean this upGood,when first has started the clean up process can take it a step further
4 space indentation,snake_case,remove a str and (),import first.
import random min_guess = 1 max_guess = 6 # Ask the user for their name and their max_guess name = input("What is your name? ") print(f"Hi {name}!") print(f"Enter a number between: {min_guess} and {max_guess}") guess = int(input("What is your guess? ")) # Generate a random number and tell the user if they won or lost secret_number = random.randint(min_guess, max_guess) if guess == secret_number: print("Congratulations, you got it right!") else: print(f"You lose - the number was {secret_number}") print("Thank you for playing Guess the Number.")