[Tutor] Begginer Python Problems - Urgent! Due by tomorrow morning.
Colleen Glaeser
songbird42371 at gmail.com
Fri Sep 3 06:11:08 CEST 2010
Dear Python Tutors,
I'm having trouble while typing a beginner program for python.
Due to troublesome circumstances, I had to take pictures of the assignment
sheet on my phone, and work from that.
Although it is all clearly legible, I still think something with my program
is not working.
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.
However, I'm getting the number 24, and a repetition of the words "Hello"
and "Greetings, earthlings."
This below is my program, and I've retyped it too many times to remember,
while looking at the assignment sheet.
What am I doing wrong? Can anybody help? D: I need to turn my results in
to class tomorrow morning!
# Lab 1
# Programmed by Colleen G.
x = 12
print (2*x)
def greetings():
for i in range (3):
print ('Hello ')
print ('Greetings, earthling')
def regreet():
for j in range(4):
greetings()
regreet()
End of program.....help needed quickly! Thank you! I am using Python 3.1.2
--
Colleen Glaeser
songbird42371 at gmail.com
636.357.8519
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100902/bd983136/attachment.html>
More information about the Tutor
mailing list