Python学习第一周-知识点

来源:互联网 发布:python入门教程第三版 编辑:程序博客网 时间:2024/05/22 00:39

for循环

for i  in range(10):    print(j)

while循环

while i>10:print(i)

if语句

_his_age =53;count =0while count<3:    his_age = int(input("his age is:"))    if his_age == _his_age:        print("you are right!")    elif his_age <_his_age:        print("the small !")    else:        print("the big !")    count += 1    if count==3:        countine_confirm =input("what are you doing?")        if countine_confirm=="n":           count =0        else:              print("come on!")
原创粉丝点击