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 songbird42...@gmail.com 636.357.8519
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor