久染

导航

Day02 (黑客成长日记)

                    #用户登录次数为三代码
# i = 0
# while i < 3:
#     username = input('请输入账号:')
#     password = input('请输入密码:')
#     if username == '1084350607'and password == ('tsy210258'):
#         print('登陆成功')
#         break
#     else:
#         print('密码错误请重试')
#         i = i + 1
#     if i >= 3:
#         print('您尝试的次数太多请稍后再试')

#                    格式化输输出  %  是占位符号(备注:在格式化中如果需要使用%,则双%%)

# name = input('请输入姓名:')
# age = input('请输入年龄:')
# hight = input('请输入身高:')
# msg = '我叫%s,今年%s,身高%s' %(name,age,hight)
# print(msg)


#                        简历简单制作(多行使用三引号)
# name = input('What is your name :')
# age = input('How old are you :')
# job = input('What do you do:')
# mer = '''-------------My   job   application ------------
# My name : %s
# My age : %d
# My job : %s
# ______________HOPE TO BE ONE OF YOU ____________''' %(name,int(age),job)
#
# print(mer)


#               while else  break  pass  初步实践尝试(break后不会执行else)
# count = 0
# while count < 12 :
#     count +=1
#     print('loop',count)
#     if count == 10:
#         pass
# else:
#     print('目标输出完毕')

#and  or  not

# print(2>1 and 1 >0)     该种逻辑运算符输出ture或者false
# print(2 > 1 and 1 < 4 or 2 < 3 and 9 > 6 or 2 < 4 and 3 < 2 )

#  优先级 ()>not > and >or


# X or Y  ,X为真,则返回X
# X and Y  ,X为真,则返回Y

 

posted on 2018-10-02 14:03  久染  阅读(300)  评论(0)    收藏  举报