if-else-then

TuPLaD spawnxx at pandora.be
Fri Sep 10 19:34:58 EDT 2004


Hi, i got the following script:

name = raw_input("Please enter your name: ")
print "Your name is", name

but i want it that way:

if 
name = Stickie
then
print "You be di man"

how do i do it ?

This i what i have from a tutorial, but with syntax errors i dont know
what im doing wrong :(

#!C:\Python23\python.exe
# My first Python Application !
# By TuPLaD
# [email]spawnxx at pandora.be[/email]

import time
def main(n):
    name = raw_input("Please enter your name: ")
    if name = Stickie:
        print 'Yo masta', name
    else:
        print "Your name is", name

time.sleep(5)

what should i do ?



More information about the Python-list mailing list