daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jul 7th, 2012 21 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def main():
  2.         print("hello, world!")
  3.         x = eval(input("give me a number! "))
  4.         print(x+1,"is my favorite number!!")
  5. main()
  6.  
  7. Python tells me:
  8. Desktop$ python hello.py
  9. hello, world!
  10. type a word: hi
  11. Traceback (most recent call last):
  12.   File "hello.py", line 7, in <module>
  13.     main()
  14.   File "hello.py", line 3, in main
  15.     x = (input("type a word: "))
  16.   File "<string>", line 1, in <module>
  17. NameError: name 'hi' is not defined
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top