[Tutor] wrong code

Kalle Svensson kalle@gnupung.net
Thu, 1 Mar 2001 14:02:01 +0100


--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sez Katharine Stoner:
[snip]

This shoud work about right if you add a variable:

fine =3D 10
day =3D input("On a scale of 1 to 10, how was your day?")
if day =3D=3D fine:
#used double equals to make    =20
    print "The salad is properly cooked."
else:
    print "Cook the salad some more."

You could also change the condition a bit:

fine =3D 8
if day >=3D fine:

This will print "The salad is properly cooked." if input is 8, 9, 10 or
anything higher than that.

Peace,
  Kalle
--=20
Email: kalle@gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD

--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6nkhJdNeA1787sd0RAtiGAJ4rO7MvdCCPFGCHHWPvYMB+nHwyegCgmzjV
79EBimfLGMaERk8CcajnGZg=
=HDCK
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--