<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
i know i should use input but when i changed to raw_input it wouldn't recognise the word print on the next line. honestly i have tried everything to get this working..<div>i am 6 hrs at one program</div><div><br></div><div><br><br>&nbsp;<br>
<font size="3"><font color="#000000"><font face="Times New Roman">&nbsp;</font></font></font><font size="3"><font color="#000000"><font face="Times New Roman"> </font></font></font><br>
Adrian Kelly <br>1 Bramble Close<br>
Baylough<br>
Athlone<br>
County Westmeath<br><br>0879495663<br><br><br><div><hr id="stopSpelling">From: waynejwerner@gmail.com<br>Date: Thu, 17 Nov 2011 16:53:59 -0600<br>Subject: Re: [Tutor] please help - stuck for hours<br>To: kellyadrian@hotmail.com<br>CC: tutor@python.org<br><br><div class="ecxgmail_quote">On Thu, Nov 17, 2011 at 4:32 PM, ADRIAN KELLY <span dir="ltr">&lt;<a href="mailto:kellyadrian@hotmail.com">kellyadrian@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">





<div><div dir="ltr">
<br><font face="Tahoma" size="2">thanks very much, great response really really appreciated it and now i understand. i hate to ask again but can you see why it won't print the &nbsp;'enter and amount over 50' in the right place??</font><div>

<font face="Tahoma" size="2"></font></div></div></div></blockquote><div><br></div><div>Computers are unfailingly stupid machines. They will do whatever wrong thing you tell them to do every single time.</div><div>&nbsp;</div>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><div><font face="Tahoma" size="2">&nbsp;</font><font size="2">&lt;snip&gt;</font><div class="ecxim"><div>def main():</div></div><div>&nbsp; &nbsp; amount=0</div><div>&nbsp; &nbsp; while amount&lt;50:</div><div class="ecxim"><div>&nbsp; &nbsp; &nbsp; &nbsp; amount = input('how much do you want to change:')</div>

</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print 'enter an amount over ¤50: '</div><div class="ecxim"><div>&nbsp; &nbsp; else:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; total=exchange(amount)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; print 'Your exchange comes to: ',total</div></div></div>

</div></div></blockquote><div><br></div><div>Sometimes it helps writing out the logic in steps before you translate it to code. In this case my guess is that these are the steps you want:</div><div><br></div><div>&nbsp; 1. Get a value from the user (you're still using input - stop that, it's dangerous! input is &nbsp; only a good function in 3.x where it replaces raw_input)</div>

<div>&nbsp;</div><div>&nbsp; 2. If the value is less than 50, tell the user to enter an amount &gt; 50 and repeat step 1</div><div><br></div><div>&nbsp; 3. Otherwise, exchange the amount and display that.</div><div><br></div><div>Right now, these are the steps that you're doing:</div>

<div><br></div><div>&nbsp; 1. Get a value from the user</div><div><br></div><div>&nbsp; 2. Display the error message</div><div><br></div><div>&nbsp; 3. If the value is &lt; 50, go to 1</div><div><br></div><div>&nbsp; 4. exchange the amount</div>

<div><br></div><div>&nbsp; 5. display the amount.</div><div><br></div><div>HTH,</div><div>Wayne</div></div></div></div>                                               </div></body>
</html>