[Tutor] HELP

smb181 smb181@mciworld.com
Tue, 14 Sep 1999 17:25:22 -0700


This is a multi-part message in MIME format.

--Boundary_(ID_acL3Ecdpm8UB7UJugEW8AA)
Content-type: text/plain; charset="iso-8859-1"
Content-transfer-encoding: quoted-printable


----- Original Message -----=20
From: smb181=20
To: tutor@python.org=20
Sent: Tuesday, September 14, 1999 5:22 PM


>>>The following is part of the [4.4 section] in the Python Tutorial. =
Please help me If you can. I am new to programming and computers;thanks =
in advance.
for n in range(2, 10):
    ...     for x in range(2, n):
    ...         if n % x =3D=3D 0:( I don't understand the n%x what does =
it mean)
    ...            print n, 'equals', x, '*', n/x
    ...            break
    ...     else:
    ...          print n, 'is a prime number'
    ...=20
    2 is a prime number
    3 is a prime number
    4 equals 2 * 2
    5 is a prime number
    6 equals 2 * 3
    7 is a prime number
    8 equals 2 * 4
    9 equals 3 * 3
thanks
SAMUEL L BESS

--Boundary_(ID_acL3Ecdpm8UB7UJugEW8AA)
Content-type: text/html; charset="iso-8859-1"
Content-transfer-encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
href=3D"mailto:smb181@mciworld.com" =
title=3Dsmb181@mciworld.com>smb181</A> </DIV>
<DIV><B>To:</B> <A href=3D"mailto:tutor@python.org"=20
title=3Dtutor@python.org>tutor@python.org</A> </DIV>
<DIV><B>Sent:</B> Tuesday, September 14, 1999 5:22 PM</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT size=3D2>&gt;&gt;&gt;The following is part of the [4.4 =
section] in the=20
Python Tutorial. Please help me If you can. I am new to programming and=20
computers;thanks in advance.</FONT></DIV>
<DIV><FONT size=3D2>for n in range(2, 10):<BR>&nbsp;&nbsp;&nbsp;=20
...&nbsp;&nbsp;&nbsp;&nbsp; for x in range(2, n):<BR>&nbsp;&nbsp;&nbsp; =
<FONT=20
color=3D#ff0000>...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if n =
% x =3D=3D=20
0:( I&nbsp;don't understand the n%x what does it =
mean)<BR>&nbsp;&nbsp;&nbsp;=20
</FONT>...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
print n, 'equals', x, '*', n/x<BR>&nbsp;&nbsp;&nbsp;=20
...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
break<BR>&nbsp;&nbsp;&nbsp; ...&nbsp;&nbsp;&nbsp;&nbsp;=20
else:<BR>&nbsp;&nbsp;&nbsp;=20
...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print n, 'is a =
prime=20
number'<BR>&nbsp;&nbsp;&nbsp; ... <BR>&nbsp;&nbsp;&nbsp; 2 is a prime=20
number<BR>&nbsp;&nbsp;&nbsp; 3 is a prime number<BR>&nbsp;&nbsp;&nbsp; 4 =
equals=20
2 * 2<BR>&nbsp;&nbsp;&nbsp; 5 is a prime number<BR>&nbsp;&nbsp;&nbsp; 6 =
equals 2=20
* 3<BR>&nbsp;&nbsp;&nbsp; 7 is a prime number<BR>&nbsp;&nbsp;&nbsp; 8 =
equals 2 *=20
4<BR>&nbsp;&nbsp;&nbsp; 9 equals 3 * 3</FONT></DIV>
<DIV><FONT size=3D2>thanks</FONT></DIV>
<DIV><FONT size=3D2>SAMUEL L BESS</FONT></DIV></BODY></HTML>

--Boundary_(ID_acL3Ecdpm8UB7UJugEW8AA)--