<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#000000 size=2>i am tyin to make a number guesing game were do i put the random genorator it the top of each child screen def </FONT></DIV>
<DIV><FONT face=Arial size=2>here is my code</FONT></DIV>
<DIV><FONT face=Arial size=2>from Tkinter import*<BR>root = Tk()<BR>root.title("main screen")<BR>root.maxsize(width=350,height=200)<BR>root.minsize(width=350,height=200)<BR>root.resizable(width=YES,height=YES)</FONT></DIV><FONT face=Arial size=2>
<DIV><BR>def child1():<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1 = Toplevel(root)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1.guess_ent = Entry(c1, width = 35,)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1.guess_ent.grid(row = 14, column = 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1.box_txt = Text(c1, width = 35, height = 5, wrap = WORD)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1.box_txt.grid(row = 3, column = 0, columnspan=2) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1.title("easy")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c1.geometry("200x200")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Button(c1,text="clear", command = NIck).grid(row=1,column=0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Button(c1,text="new game",).grid(row=1,column=1)</DIV>
<DIV>def NIck():<BR>&nbsp;&nbsp;&nbsp; child1.box_txt.delete(0.0, END)</DIV>
<DIV><BR>def child2():<BR>&nbsp;&nbsp;&nbsp; c2 = Toplevel(root)<BR>&nbsp;&nbsp;&nbsp; box_txt = Text(c2, width = 35, height = 5, wrap = WORD)<BR>&nbsp;&nbsp;&nbsp; box_txt.grid(row = 3, column = 0, columnspan=2,sticky = W) <BR>&nbsp;&nbsp;&nbsp; c2.title("medium")<BR>&nbsp;&nbsp;&nbsp; c2.geometry("200x200")<BR>def child3():<BR>&nbsp;&nbsp;&nbsp; c3 = Toplevel(root)<BR>&nbsp;&nbsp;&nbsp; box_txt = Text(c3, width = 35, height = 5, wrap = WORD)<BR>&nbsp;&nbsp;&nbsp; box_txt.grid(row = 3, column = 0, columnspan=2,sticky = W) <BR>&nbsp;&nbsp;&nbsp; c3.title("hard")<BR>&nbsp;&nbsp;&nbsp; c3.geometry("200x200")</DIV>
<DIV><BR>Label(root,text = "choose which game you would like to play").grid(row=0,column=0,columnspan=2)<BR>Button(root,text="easy",command=child1).grid(row=1,column=0)<BR>Button(root,text="medium",command=child2).grid(row=1,column=1)<BR>Button(root,text="hard",command=child3).grid(row=1,column=3)</DIV>
<DIV></FONT>&nbsp;</DIV><p><i><font size="3">This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender.</font></i></p></BODY></HTML>