Monday, January 5, 2009

Evil Message

import sys
import math
def evilmsg(person):
print "This computer is going to eat %s" % person
return
person=input("Enter your name here: ")
evilmsg(person)
stuff=input("Hit a key: ")

2 comments:

  1. Note, if using python verson 3.0 the print command has been turned into a function. So users using python 3.00 must use print as such:

    print("This computer is going to eat %s"%person)

    ReplyDelete
  2. By the way, this is why python didn't recognize the print command in class

    ReplyDelete