My first Python script
2017-01-10 13:11
288 查看
print 打印内容
raw_input用户输入
第一个学习脚本:
-----------------------------------------------------------
#usr/bin/python
print 'hello,world'
print 'The quick brown fox','jump over','the lazy dog'
print '100+200=', 100+200
name = raw_input('please input your name:\n')
print 'hello',name
------------------------------------------------------------
执行后的输出:
-------------------------------------------------------------
hello,world
The quick brown fox jump over the lazy dog
100+200= 300
please input your name:
nana
hello nana
------------------------------------------------------------
OK, that's for today ~
raw_input用户输入
第一个学习脚本:
-----------------------------------------------------------
#usr/bin/python
print 'hello,world'
print 'The quick brown fox','jump over','the lazy dog'
print '100+200=', 100+200
name = raw_input('please input your name:\n')
print 'hello',name
------------------------------------------------------------
执行后的输出:
-------------------------------------------------------------
hello,world
The quick brown fox jump over the lazy dog
100+200= 300
please input your name:
nana
hello nana
------------------------------------------------------------
OK, that's for today ~
相关文章推荐
- My First Python code for learnning English.
- Python sample code of hudson remote api, my first Python hello world
- [Ant存档] My First Hand-writing Ant script
- My first Python program(附增加清屏方法)
- apache+wsgi+python: Premature end of script headers: mytest.py
- [原]My first Python
- [原]My first Python
- My first program written in Python
- My first GreaseMonkey Script: VeryCD quick search
- My first Python
- Python之first script
- my first shell script
- NS-3 MyFirstScriptExample
- [Source Code] My First Python Program
- My first Python class
- 【Python学习之路】My first journey
- [译]Why do people write #!/usr/bin/env python on the first line of a Python script?
- My first Python
- my first blog
- my first blog article