[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> </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>>>>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> =20
... for x in range(2, n):<BR> =
<FONT=20
color=3D#ff0000>... if n =
% x =3D=3D=20
0:( I don't understand the n%x what does it =
mean)<BR> =20
</FONT>... &nb=
sp;=20
print n, 'equals', x, '*', n/x<BR> =20
... =20
break<BR> ... =20
else:<BR> =20
... print n, 'is a =
prime=20
number'<BR> ... <BR> 2 is a prime=20
number<BR> 3 is a prime number<BR> 4 =
equals=20
2 * 2<BR> 5 is a prime number<BR> 6 =
equals 2=20
* 3<BR> 7 is a prime number<BR> 8 =
equals 2 *=20
4<BR> 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)--