# -*- coding: UTF-8 -*-
print "hello world"
# ====多行语句====
sums = 1 + \
2 + \
3
print(sums)
days = ['monday', 'Tuesday',
'Monday']
print(days)
# =====等待用户输入======
# raw_input("按下 enter 键退出,其他键任意显示... \n")
# =====同一行显示多条语句=======
# 用;分开
import sys; x = 'runoob'; sys.stdout.write(x + '\n')
# =====输出语句========
x = 'a' # py中的变量不用声明变量类型但是必须得赋值之后才会被创建
y = 'b'
print x, # 加了逗号表示不换行输出
print y
# ======条件判断=====
sc = 80
if sc < 60:
# 注意要有冒号
print 'E'
else:
print "过了"
# 要输出汉字需要在开头加个东西
# ======多个变量赋值==========
a = b = c = 1
print a, b, c
print (a, b, c) # 这样输出会带一个括号
m, n, p = 1, 2, "join"
print m, n, p
# =======标准数据类型
'''
Numbers (数字)
String (字符串)
List (列表)
Tuple (元组)
Dictionary (字典)
'''
# ======循环控制=======
# 输出金字塔
level = 0
# 缩进问题
while level < 10: # 两个逗号不能少 注意缩进
cnt = 0
while cnt < 10-level:
cnt = cnt + 1
print(" "),
cnts = 0
while cnts < 2*level-1:
cnts = cnts + 1
print("*"),
print("")
level = level + 1

