print 'hello,python'
print "hello,python"
print "hello,python"
2016-01-14
print 45678 + 0x12fd2
print 'Learn Python in imooc'
print 100 < 99
print 0xff == 255
print 'Learn Python in imooc'
print 100 < 99
print 0xff == 255
2016-01-14
>>> print (u'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。''')
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。
其实3.4挺好的……
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。''')
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。
其实3.4挺好的……
2016-01-14
# -*- coding: utf-8 -*-
print r'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
print r'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
2016-01-14
int start=1;//起始项是1
int sum=1;//当只有一项时和为1
for(int l=1;l<=3;l++){
start=start+3;//获取每项的值
sum=start+sum;//将每项的值加到sum中去
}
System.out.println(sum);
int sum=1;//当只有一项时和为1
for(int l=1;l<=3;l++){
start=start+3;//获取每项的值
sum=start+sum;//将每项的值加到sum中去
}
System.out.println(sum);
2016-01-14
Python 3.4.3
>>> print ('\'\\"To be, or not to be\\": that is the question.\\nWhether it\\\'s nobler in the mind to suffer.\'')
'\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'
别问我……我整个人都是奔溃的……
>>> print ('\'\\"To be, or not to be\\": that is the question.\\nWhether it\\\'s nobler in the mind to suffer.\'')
'\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'
别问我……我整个人都是奔溃的……
2016-01-14
>>> print r'''''\'\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.\''''''
''\'\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.\'
''\'\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.\'
2016-01-14
Python 2.7.11
>>> print r'''\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.'''
\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.
>>> print r'''\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.'''
\'to be, or not to be\":that is the question.\nWhether it\'s nobler in the mind to suffer.
2016-01-14
1.x从1--100开始递增
2.判断x是否在100范围中
3.判断x是否为奇数
是:递加到sum变量中
否:跳过后面语句
2.判断x是否在100范围中
3.判断x是否为奇数
是:递加到sum变量中
否:跳过后面语句
2016-01-14