<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Hi,<br><br>Just guessing:<br><br>x = 12<br><br>print (2*x)<br><br>def greetings(no):<br>&nbsp;&nbsp;&nbsp; for i in range (no+1):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print ('Hello ')<br>&nbsp;&nbsp;&nbsp; print ('Greetings, earthling')<br><br>def regreet(no):<br>&nbsp;&nbsp;&nbsp; for j in range(no+1):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; greetings(no)<br><br>prompt = "Enter a number: "<br>no = raw_input(prompt)<br>regreet(no)<br><br>It's not tested because I run Python 2.7 It's generally recommended that novice programmers run Py 2.x<br><div>&nbsp;</div>Cheers!!<br>Albert-Jan<br><br><div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water
 system, and public health, what have the Romans ever done for us?<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Colleen Glaeser &lt;songbird42371@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> tutor@python.org<br><b><span style="font-weight: bold;">Sent:</span></b> Fri, September 3, 2010 6:11:08 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [Tutor] Begginer Python Problems - Urgent! Due by tomorrow morning.<br></font><br>
Dear Python Tutors,<br><br>I'm having trouble while typing a beginner program for python.<br>Due to troublesome circumstances, I had to take pictures of the assignment sheet on my phone, and work from that.<br>Although it is all clearly legible, I still think something with my program is not working.<br>
<br>If I run the program in the shell, I should be getting something that asks for a number, and I need to try positive and negative numbers and see what spits out.<br><br>However, I'm getting the number 24, and a repetition of the words "Hello" and "Greetings, earthlings."<br>
<br>This below is my program, and I've retyped it too many times to remember, while looking at the assignment sheet.<br>What am I doing wrong?&nbsp; Can anybody help?&nbsp; D:&nbsp; I need to turn my results in to class tomorrow morning!<br>
<br># Lab 1<br># Programmed by Colleen G.<br><br>x = 12<br><br>print (2*x)<br><br>def greetings():<br>&nbsp;&nbsp;&nbsp; for i in range (3):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print ('Hello ')<br>&nbsp;&nbsp;&nbsp; print ('Greetings, earthling')<br><br>def regreet():<br>
&nbsp;&nbsp;&nbsp; for j in range(4):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; greetings()<br><br>regreet()<br><br><br>End of program.....help needed quickly!&nbsp; Thank you!&nbsp; I am using Python 3.1.2<br clear="all"><br>-- <br>Colleen Glaeser<br><a rel="nofollow" ymailto="mailto:songbird42371@gmail.com" target="_blank" href="mailto:songbird42371@gmail.com">songbird42371@gmail.com</a> <br>
636.357.8519<br>
</div></div></div>
</div><br>

      </body></html>