python的hello,world
2011-05-30 22:40
796 查看
这两天看了一章《集体智慧编程》,书中的程序是用python写的,而我又想实现一下,于是提起了学习python语音的兴趣来。
首先,从网上下了python for windows安装,然后运行。
照例还是第一条语句:print "hello,world".
可是提示出错,应该是不能识别关键词,我可是照书抄的啊!这也能出错?
后来想了想,应该是python的版本问题,不同的版本,语法的不太一样。
上网一查,果然如此,更高的版本print语句已经是一个函数了。
正确的写法应该是:print ("hello,world!").
哦可,第一个程序运行起来了!
首先,从网上下了python for windows安装,然后运行。
照例还是第一条语句:print "hello,world".
可是提示出错,应该是不能识别关键词,我可是照书抄的啊!这也能出错?
后来想了想,应该是python的版本问题,不同的版本,语法的不太一样。
上网一查,果然如此,更高的版本print语句已经是一个函数了。
正确的写法应该是:print ("hello,world!").
哦可,第一个程序运行起来了!
相关文章推荐
- Python 学习 PyQt Hello World
- 在 Python中使用 cout << 'Hello,world!' << endl
- Python中Django创建第一个项目(hello,world)
- python hello world
- 【Hacker Rank】01.Say "Hello, World!" With Python
- python 3.4.0 简单的print 'hello world',出错--SyntaxError: invalid syntax
- hello,world! python
- 【Hello Python World】Class Notes of Week 5
- Ubuntu:python helloworld.py SyntaxError: invalid syntax
- Python 2.7.9 Demo - 001.print_hello_world - 002.print_chinese
- Byte-of-python笔记代码1:helloworld.py
- Python2.7.3 学习——第一个程序 Hello Python World
- IronPython Hello world
- Python基础01 Hello World!
- python安装web.py实现hello,world!
- python hello world
- 第一个hello world in python
- Python基础2- Hello,world
- 20080828 python HelloWorld
- Hello,World! Python.