• [python] 初学python,打卡签到


    自学python第一周,学了变量和简单的条件判断。

    附上猜数游戏代码

     1 #Author:shijt
     2 trueAge=40
     3 count=0
     4 while count<3:
     5     guessAge=int(input("how old is he?"))
     6     if guessAge==trueAge:
     7         print("yes,great!")
     8         break
     9     elif guessAge>trueAge:
    10         print("too big")
    11     else:
    12         print("too small")
    13 
    14     count+=1
    15     if count==3:
    16         flag=input("do you want to countine?")
    17         if flag!='n':
    18             count=0

    以后可以在简历上写上:

    精通python。。。。。。。hello,world的输出

  • 相关阅读:
    表单
    框架
    表格
    列表
    标签
    封装类(包装类)
    常见类 --Object
    日志
    异常
    选择结构
  • 原文地址:https://www.cnblogs.com/shijt/p/7470412.html
Copyright © 2020-2023  润新知