#encoding=utf-8
'''
    while 循环代码结构：
        while 条件表达式：
            代码指令
    1.初始值
    2.条件表达式
    3.自增或自减  否则导致死循环
'''

#例：输出1-100之间的数
# import random
# index = 1
# while index < 100:
#     print(index)
#     index += 1
#     pass
# while index < 100:
#     number = int(input("请输入一个数："))
#     computer = random.randint(0,2)
#     if number == 0 and computer == 2:
#         print("恭喜你赢了！！！")
#         pass
#     elif number == 1 and computer == 0:
#         print("恭喜你赢了！！！")
#         pass
#     elif number == 2 and computer == 1:
#         print("恭喜你赢了！！！")
#         pass
#     elif number == computer:
#         print("平手")
#         pass
#     else:
#         print("you loss")
#         pass
#     index += 1
#     pass

#输出九九乘法表
# row = 1
# while row <= 9:
#     col = 1
#     while col <= row:
#         print("%d*%d=%d" %(row,col,row*col),end=" ")   #以。。。为结尾
#         col += 1
#         pass
#     print("")  #打印换行
#     row += 1
#     pass

#打印直角三角形




