摘要:
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_... 阅读全文
摘要:
#while循环#猜女孩的年龄,有三次机会age_girl = 18count = 0while True: if count == 3: break guess_age = int(input("guess age:")) if guess_age ==age_girl: print("yes,y 阅读全文
摘要:
#输入密码不显示(隐藏)import getpassusername = input("username:")password = getpass.getpass("password:")print(username,password) #判断用户名和密码是否输入正确 _username = 'al 阅读全文
摘要:
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... 阅读全文
摘要:
注:结果打印出来的是: My name is ShanShan ShanShanPaoChe Ge ShanShan 阅读全文