<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C562A6.FEF3A240">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I asked for help on my problem but unfortunately now help
yet. I am trying to put up instructions for a board game and then have the
person read and then proceed onto the game. The following is what I have that
displays the instructions just fine but will not let the game proceed on to the
board and the <span class=GramE>game.:</span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The instruction section works fine and the game part works
fine but not together. I guess I need the widget to have a button that allows
the reader to proceed.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Appreciate help as I am just learning. I am thinking that
the widget doesn’t qualify as a screen.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Gene<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>import</span></font></span> random, math<o:p></o:p></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>from</span></font></span> livewires import games,
color<o:p></o:p></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>from</span></font></span> <span class=SpellE>Tkinter</span>
import *<o:p></o:p></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>SCREEN_WIDTH = 1280<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>SCREEN_HEIGHT = 768<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>THE_SCREEN = <span class=SpellE><span class=GramE>games.Screen</span></span><span
class=GramE>(</span>SCREEN_WIDTH, SCREEN_HEIGHT)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>class</span></font></span> Application(Frame):<o:p></o:p></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span style='mso-spacerun:yes'>
</span><span class=GramE>def</span> __init__(self, master):<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span>""" Initialize the frame. """<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>Frame.__init</span>_<span class=GramE>_(</span>self, master)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE><span class=GramE>self.grid</span></span><span class=GramE>()</span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.create_<span class=GramE>widgets</span></span><span
class=GramE>()</span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span style='mso-spacerun:yes'> </span><span
class=GramE>def</span> <span class=SpellE>create_widgets</span>(self):<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span>""" Create button, text, and entry widgets.
"""<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span>#
create instruction label<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.inst_lbl</span> = <span class=GramE>Label(</span>self, text =
"Enter your Name, please")<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.inst_<span class=GramE>lbl.grid</span></span><span
class=GramE>(</span>row = 0, column = 0, <span class=SpellE>columnspan</span> =
2, sticky = W)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span>#
create label for name input<span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.pw_lbl</span> = <span class=GramE>Label(</span>self, text =
"Name: ")<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.pw_<span class=GramE>lbl.grid</span></span><span class=GramE>(</span>row
= 1, column = 0, sticky = W)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span># create entry widget to accept name<span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.pw_ent</span> = <span class=GramE>Entry(</span>self)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.pw_<span class=GramE>ent.grid</span></span><span class=GramE>(</span>row
= 1, column = 1, sticky = W)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span>#
create submit button<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.submit_bttn</span> = <span class=GramE>Button(</span>self,
text = "Submit", command = <span class=SpellE>self.reveal</span>)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.submit_<span class=GramE>bttn.grid</span></span><span
class=GramE>(</span>row = 2, column = 0, sticky = W)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span>#
create text widget to display message<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.instruction_txt</span> = <span class=GramE>Text(</span>self,
width = 65, height = 30, wrap = WORD)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.instruction_<span class=GramE>txt.grid</span></span><span
class=GramE>(</span>row = 3, column = 0, <span class=SpellE>columnspan</span> =
3, sticky = W)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span style='mso-spacerun:yes'> </span><span
class=GramE>def</span> reveal(self):<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span>""" Display message based on name. """<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=GramE>contents</span> = <span class=SpellE>self.pw_ent.get</span>()<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=GramE>if</span> contents == "Joe":<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span>message = """<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span><span
style='mso-spacerun:yes'> </span>The
rules of the game are: etc. etc.<span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span>"""<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=GramE>else</span>:<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span><span class=GramE>message</span> = "That's not your first name, try
again!" <o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.instruction_<span class=GramE>txt.delete</span></span><span
class=GramE>(</span>0.0, END)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><span
class=SpellE>self.instruction_<span class=GramE>txt.insert</span></span><span
class=GramE>(</span>0.0, message)<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span
style='mso-spacerun:yes'>
</span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><span style='mso-tab-count:1'> </span><span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'># <span class=GramE>main</span><o:p></o:p></span></font></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>root</span></font></span> = <span class=SpellE>Tk</span>()<o:p></o:p></p>
<p class=MsoPlainText><span class=SpellE><span class=GramE><font size=2
face="Courier New"><span style='font-size:10.0pt'>root.title</span></font></span></span><span
class=GramE>(</span>"Name")<o:p></o:p></p>
<p class=MsoPlainText><span class=SpellE><span class=GramE><font size=2
face="Courier New"><span style='font-size:10.0pt'>root.geometry</span></font></span></span><span
class=GramE>(</span>"1280x768")<o:p></o:p></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>app</span></font></span> = Application(root)<o:p></o:p></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><span class=SpellE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>my_screen</span></font></span> = THE_SCREEN<o:p></o:p></p>
<p class=MsoPlainText><span class=SpellE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>wall_image</span></font></span> = <span class=SpellE>games.load_<span
class=GramE>image</span></span><span class=GramE>(</span>"<span
class=SpellE>board.jpg</span>", transparent = False)<o:p></o:p></p>
<p class=MsoPlainText><span class=SpellE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>my_screen.set_<span class=GramE>background</span></span></font></span><span
class=GramE>(</span><span class=SpellE>board_image</span>)<o:p></o:p></p>
<p class=MsoPlainText><span class=GramE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>etc</span></font></span>. etc.<o:p></o:p></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><span class=SpellE><font size=2 face="Courier New"><span
style='font-size:10.0pt'>my_<span class=GramE>screen.mainloop</span></span></font></span><span
class=GramE>()</span><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>