# template for "Guess the number" mini-project
# input will come from buttons and an input field
# all output for the game will be printed in the console



# helper function to start and restart the game
def new_game():
    # initialize global variables used in your code here

    # remove this when you add your code    
    pass


# define event handlers for control panel
def range100():
    # button that changes the range to [0,100) and starts a new game 
    
    # remove this when you add your code    
    pass

def range1000():
    # button that changes the range to [0,1000) and starts a new game     
    
    pass
    
def input_guess(guess):
    # main game logic goes here	
    
    # remove this when you add your code
    pass

    
# create frame


# register event handlers for control elements and start frame


# call new_game 
new_game()


# always remember to check your completed program against the grading rubric

@@ -147,17 +147,57 @@
 console%0A
-%0A
+import random%0A%0Atarget = 0%0Amax_range = 100
 %0A%0A# help
@@ -262,115 +262,63 @@
     
-# initialize 
 global 
-variables used in your code here%0A%0A    # remove this when you add your code    %0A    pass
+target%0A    target = random.randint(0, max_range)
 %0A%0A%0A#
@@ -382,239 +382,140 @@
     
-# button that changes the range to %5B0,100) and starts a
+global max_range %0A    max_range = 100%0A   
  new
- 
+_
 game
- 
+()
 %0A    %0A
-    # remove this when you add your code    %0A    pass%0A%0Adef range1000():%0A    # button that changes the range to %5B0,1000) and starts a
+%0Adef range1000():%0A    global max_range%0A    max_range = 1000%0A   
  new
- 
+_
 game
-     %0A    %0A    pass
+()
 %0A   
@@ -737,20 +737,134 @@
 me %0A
-new_game()%0A%0A
+if __name__ == %22__main__%22:%0A    new_game()%0A    print(target)%0A    range1000()%0A    print(target)%0A    range100()%0A    print(target)
 %0A# a

add range100, range1000, new_game() functionality