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? Can anybody help? D: 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> for i in range (3):<br> print ('Hello ')<br> print ('Greetings, earthling')<br><br>def regreet():<br>
for j in range(4):<br> greetings()<br><br>regreet()<br><br><br>End of program.....help needed quickly! Thank you! I am using Python 3.1.2<br clear="all"><br>-- <br>Colleen Glaeser<br><a href="mailto:songbird42371@gmail.com">songbird42371@gmail.com</a> <br>
636.357.8519<br>