<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/18/2012 7:59 PM, Frank Pontius
wrote:<br>
</div>
<blockquote cite="mid:001d01cdad8c$8f83d220$ae8b7660$@com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="MS Exchange Server version
08.00.0681.000">
<title>Help with class example</title>
<!-- Converted from text/rtf format -->
<p dir="LTR"><span lang="en-us"><font face="Calibri">Hello,</font></span></p>
</blockquote>
<font face="Calibri">Hi - this just showed up in my mailbox. Perhaps
there was a delay getting it posted.<br>
<br>
The </font><span lang="en-us"><font face="Calibri">“</font></span><span
lang="en-us"><font face="Calibri"></font></span><span lang="en-us"><font
face="Calibri">” around tails and heads are not ascii quote
characters. They are what some word processors change ascii
quotes into to meet typesetting requirements.<br>
<br>
Use a text editor, or type the code directly into IDLE.<br>
</font></span>
<blockquote cite="mid:001d01cdad8c$8f83d220$ae8b7660$@com"
type="cite">
<p dir="LTR"><span lang="en-us"><font face="Calibri">I</font></span><span
lang="en-us"><font face="Calibri">’</font></span><span
lang="en-us"><font face="Calibri">m taking a beginners course
on Python.</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Have class
example which is to be used in H/W, which I can</font></span><span
lang="en-us"><font face="Calibri">’</font></span><span
lang="en-us"><font face="Calibri">t get to work. Thus I
figure the example is wrong. But I need this to get H/W
done.</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">U</font></span><span
lang="en-us"><font face="Calibri">sing</font></span><span
lang="en-us"> <font face="Calibri">‘</font></span><span
lang="en-us"><font face="Calibri">import random</font></span><span
lang="en-us"><font face="Calibri">’</font></span><span
lang="en-us"><font face="Calibri"> and random.randrange in</font></span><span
lang="en-us"> <font face="Calibri">function</font></span><span
lang="en-us"><font face="Calibri">,</font></span><span
lang="en-us"><font face="Calibri"> returning #.</font></span><span
lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">import random</font></span><span
lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">def
RandomNumberGen ():</font></span></p>
<p dir="LTR"><span lang="en-us"> <font face="Calibri">if
random.randrange(0, 2) =</font></span><span lang="en-us"><font
face="Calibri">= 0:</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">
X</font></span><span lang="en-us"> <font face="Calibri">return</font></span><span
lang="en-us"> <font face="Calibri">“</font></span><span
lang="en-us"><font face="Calibri">tails</font></span><span
lang="en-us"><font face="Calibri">”</font></span><span
lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"> <font face="Calibri">return</font></span><span
lang="en-us"> <font face="Calibri">“</font></span><span
lang="en-us"><font face="Calibri">heads</font></span><span
lang="en-us"><font face="Calibri">”</font></span><span
lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Simple
enough, but running in my Python 2.7.</font></span><span
lang="en-us"><font face="Calibri">3</font></span><span
lang="en-us"><font face="Calibri"> IDLE</font></span><span
lang="en-us"><font face="Calibri"> -</font></span><span
lang="en-us"><font face="Calibri"> it will not even run</font></span><span
lang="en-us"><font face="Calibri">,</font></span><span
lang="en-us"><font face="Calibri"> and give syntax</font></span><span
lang="en-us"> <font face="Calibri">(red char box)</font></span><span
lang="en-us"> <font face="Calibri">error at the X above.</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Frank</font></span><span
lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Tutor maillist - <a class="moz-txt-link-abbreviated" href="mailto:Tutor@python.org">Tutor@python.org</a>
To unsubscribe or change subscription options:
<a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Bob Gailer
919-636-4239
Chapel Hill NC</pre>
</body>
</html>