在python中,流程控制语句为强制缩进(4空格) if username=='lmc' and password=='123456': print('Welcome User {name} login...'.format(name=username))else: print('Invalid username or password') 不能这样写: if 条件: do something... else: do something... print()#这个语句前敲了1个空格 会显示Ind…
_username='Lily' _password=' username=input("username:") password=input("password:") if _username==username and _password==password: print("Welcome user {name} login....".format(name=username)) else: print("Invalid usern…
count = 0 while True: #print('count:',count) if count == 3: print('you guess over 3 times!fuck off!') break age = int(input('Please guess the lmc age:')) if age == 18: print('yes,you got it!') break elif age < 18: print('think bigger…') else: print('…