[Tutor] what's wrong with this code

Charlie Derr drivel_drool@bigfoot.com
Wed, 28 Feb 2001 19:50:06 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0165_01C0A1BF.A60A9230
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Just reverse the assignment line


temperature = input("What is the temperature of the spam?")

    ~c
  -----Original Message-----
  From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
Katharine Stoner
  Sent: Wednesday, February 28, 2001 6:55 PM
  To: python tutor
  Subject: [Tutor] what's wrong with this code


  What's wrong with this code?  I don't understand. Please help.

  input("What is the temperature of the spam?") = temperature

      if temperature > 50:
          print "The salad is properly cooked."
      else:
          print "Cook the salad some more."

  -Cameron Stoner

------=_NextPart_000_0165_01C0A1BF.A60A9230
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.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D492094600-01032001>Just=20
reverse the assignment line</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D492094600-01032001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D492094600-01032001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D492094600-01032001>temperature =3D input("What is the =
temperature of the=20
spam?")</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D492094600-01032001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D492094600-01032001>&nbsp;&nbsp;&nbsp; ~c</SPAN></FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> =
tutor-admin@python.org=20
  [mailto:tutor-admin@python.org]<B>On Behalf Of </B>Katharine=20
  Stoner<BR><B>Sent:</B> Wednesday, February 28, 2001 6:55 =
PM<BR><B>To:</B>=20
  python tutor<BR><B>Subject:</B> [Tutor] what's wrong with this=20
  code<BR><BR></DIV></FONT>
  <DIV><FONT face=3DArial size=3D2>What's wrong with this code?&nbsp; I=20
  don't&nbsp;understand. Please help.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>input("What is the temperature of the =
spam?") =3D=20
  temperature</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; if temperature =
&gt;=20
  50:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "The salad is =
properly=20
  cooked."<BR>&nbsp;&nbsp;&nbsp;=20
  else:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Cook the =
salad some=20
  more."</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>-Cameron=20
Stoner</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0165_01C0A1BF.A60A9230--