Re: [Tutor] Shuts down when asking user for info

2011-01-26 Thread Alan Gauld


"tee chwee liong"  wrote


maybe you can use raw_input?


It looks like the OP is using Python 3 so input() is the correct 
function.



Alan G. 



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Shuts down when asking user for info

2011-01-26 Thread Alan Gauld


"Casey Key"  wrote


Please help , run the script and see that once you press enter after
entering name it just shuts it down, help.



--

print("\tWelcome to Casey's magical python code!")
print("\tWritten by no other than Casey Key!")
print("\nWe will begin by getting some information,mmmkay?")
name = input("what is your name")
Print("your name is",name)

-


Python is case sensitive, print starts with a lowercase P.

However that should have generated an error.
How did you run the program? If you ran it from an IDE or
from the command prompt you would have seen the error.
I suspect you are just double clicking in a file manager?
Doing that the window will close before you can read it.
Always test your code by running from a prompt so that
you see all output, including errors.


Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/






___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Shuts down when asking user for info

2011-01-26 Thread tee chwee liong

maybe you can use raw_input? 
 
Date: Tue, 25 Jan 2011 19:51:28 -0700
From: i.eat.brain...@gmail.com
To: tutor@python.org
Subject: [Tutor] Shuts down when asking user for info

Please help , run the script and see that once you press enter after
entering name it just shuts it down, help.

___ Tutor maillist - 
Tutor@python.org To unsubscribe or change subscription options: 
http://mail.python.org/mailman/listinfo/tutor   
 ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Shuts down when asking user for info

2011-01-26 Thread Casey Key
Please help , run the script and see that once you press enter after
entering name it just shuts it down, help.
print("\tWelcome to Casey's magical python code!")
print("\tWritten by no other than Casey Key!")
print("\nWe will begin by getting some information,mmmkay?")
name = input("what is your name")
Print("your name is",name)


input("\n\nPress the enter key to exit.")
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor