print "Halt!"
user_reply = raw_input("Who goes there? ")
print "You may pass,", user_reply
Posted 12 September 2010 - 07:46 PM
Posted 12 September 2010 - 10:07 PM
Posted 12 September 2010 - 10:10 PM
Posted 12 September 2010 - 11:00 PM
Posted 12 September 2010 - 11:05 PM
Posted 12 September 2010 - 11:09 PM
Posted 12 September 2010 - 11:24 PM
Posted 12 September 2010 - 11:28 PM
Posted 12 September 2010 - 11:32 PM
Posted 12 September 2010 - 11:34 PM
Posted 12 September 2010 - 11:38 PM
def printit(): print "Boo" print "I see you"
printit()
Posted 12 September 2010 - 11:41 PM
Posted 12 September 2010 - 11:43 PM
I'm just starting out for now, thanks i'll try that.
Can you tell me what the 'def' means?
Posted 12 September 2010 - 11:45 PM
Posted 12 September 2010 - 11:50 PM
Posted 12 September 2010 - 11:54 PM
Posted 13 September 2010 - 01:34 AM
def hello_world: print "hello\r\n" print "world" hello_world()
Posted 13 September 2010 - 07:11 AM
Nawwww F*CKING H*LL this is soooo f*cking simple and I'm screwing it up (wait can you swear uncensored here??)
I seriously can't get a simple line underneath a line. What do I press? Enter doesn't work, neither does /n or :
It goes
>>> print "blah"
>>> print "blah
and then I can't edit the first print so its a seperate command alltogether. *turns to google*
Edited by Faval, 13 September 2010 - 07:11 AM.
Posted 13 September 2010 - 07:38 PM
Hmm, I believe someone earlier said to use \n not /n for a newline character in most languages.
Posted 16 September 2010 - 06:28 AM
Edited by SmokingKush, 16 September 2010 - 06:29 AM.
Posted 06 October 2010 - 02:14 PM
print "Halt!"
user_reply = raw_input("Who goes there?\n")
print "You may pass, ", user_reply
print "my text without a new line", #note the trailing comma
print "my text with a new line"
import sys
sys.stdout.write("a much faster way to write without a new line")
sys.stdout.write("lets add a new line\n")
0 members, 1 guests, 0 anonymous users