摘要:
for i in range(10): print("loop ",i)age_girl =18for i in range(3): guess_age = int(input("guess age:")) if guess_age == age_girl : print("yes,you got it. ") break elif guess_... 阅读全文
posted @ 2018-09-28 15:59
杉杉归来
阅读(161)
评论(0)
推荐(0)
摘要:
#while循环#猜女孩的年龄,有三次机会age_girl = 18count = 0while True: if count == 3: break guess_age = int(input("guess age:")) if guess_age ==age_girl: print("yes,y 阅读全文
posted @ 2018-09-28 15:54
杉杉归来
阅读(127)
评论(0)
推荐(0)
摘要:
#输入密码不显示(隐藏)import getpassusername = input("username:")password = getpass.getpass("password:")print(username,password) #判断用户名和密码是否输入正确 _username = 'al 阅读全文
posted @ 2018-09-28 15:37
杉杉归来
阅读(287)
评论(0)
推荐(0)
摘要:
name = input("name:")age = int(input("age:")) #integer整型job = input("job:")salary= input("salary:")info1 = '''-------- info of %sName:%sAge:%dJob:%ssalary:%s''' %(name,name,age,job,salary)print(info1... 阅读全文
posted @ 2018-09-28 15:31
杉杉归来
阅读(237)
评论(0)
推荐(0)
摘要:
注:结果打印出来的是: My name is ShanShan ShanShanPaoChe Ge ShanShan 阅读全文
posted @ 2018-09-28 15:26
杉杉归来
阅读(139)
评论(0)
推荐(0)

浙公网安备 33010602011771号