zoukankan      html  css  js  c++  java
  • 流程控制之if...else

    #_*_coding:utf-8_*_

    # 如果:女人的年龄 > 30岁,那么:叫阿姨

    # age_of_girl = input('Please enter your age:')
    # age_of_girl = int(age_of_girl)
    #
    # if age_of_girl > 30:
    # print('Aunt')

    # 如果:女人的年龄 > 30岁,那么:叫阿姨,否则:叫小姐姐

    # age_of_girl = input('Please enter your age:')
    # age_of_girl = int(age_of_girl)
    #
    # if age_of_girl > 30:
    # print('Aunt')
    # else:
    # print('Beautiful Girl!')

    # 如果:女人的年龄 >= 18并且 < 22岁并且身高>170并且体重<100并且是漂亮的,那么:表白,否则:叫阿姨

    # age_of_girl = input('Please enter your age:')
    # age_of_girl = int(age_of_girl)
    # height = input('Please enter your height:')
    # height = int(height)
    # weight = input('Please enter your weight:')
    # weight = int(weight)
    # pretty = input('Are u pretty?[True or False]:')
    #
    # if age_of_girl >= 18 and age_of_girl < 22 and weight < 100 and pretty == True:
    # print("I'm falling in love")
    # else:
    # print("Hey Old Aunt!")

    # 如果:表白成功,那么:在一起,否则:打印qnmlgb的爱情
    # age_of_girl = input('Please enter your age:')
    # age_of_girl = int(age_of_girl)
    # height = input('Please enter your height:')
    # height = int(height)
    # weight = input('Please enter your weight:')
    # weight = int(weight)
    # pretty = input('Are u pretty?[Yes or No]:')


    # if age_of_girl >= 18 and age_of_girl < 22 and height>170 and weight < 100 and pretty == 'Yes':
    #
    # print("I'm falling in love")
    # girl_said = input('What the girl said?[Yes or NO]:')
    #
    # if girl_said == 'Yes':
    # print("good!")
    # else:
    # print("Oh shit! Old Aunt!")
    # else:
    # print('Hey Old Aunt!')

    # 如果:成绩》=90,那么:优秀
    # score = input('Please enter your score:')
    # score = int(score)
    # if score >= 90 :
    # print('A')
    # elif score >=80 and score < 90:
    # print('B')
    # elif score >=70 and score < 80:
    # print('C')
    # else:
    # print('Failure is the mother of success')

    #练习一:用户登录验证
    # username = input('Please enter your username:')
    # password = input('Please enter your password:')
    #
    # if username == 'oOC' and password == '123456':
    # print('login success')
    # else:
    # print('Please try again.')

    #练习二:根据用户输入内容输出其权限
    # name=input('请输入用户名字:')
    #
    # if name == 'egon':
    # print('超级管理员')
    # elif name == 'tom':
    # print('普通管理员')
    # elif name == 'jack' or name == 'rain':
    # print('业务主管')
    # else:
    # print('普通用户')

    #练习三:上班OR出去浪
    # today = input('Today is __??__:')
    #
    # if today in ['Saturday','Sunday']:
    # print('Enjoy the time!')
    # elif today in ['Monday','Tuesday','Wednesday','Thursday','Friday']:
    # print('go to work')
    # else:
    # print('''
    # Monday
    # Tuesday
    # Wednesday
    # Thursday
    # Friday
    # Saturday
    # Sunday
    # ''')

  • 相关阅读:
    nodejs 提示‘xxx’ 不是内部或外部命令解决方法
    nodejs安装express不是内部或外部命令
    菜鸟供应链升级实践
    数据治理框架解读分析
    Canal+Kafka实现MySQL与Redis数据同步
    一条 SQL 引发的事故,同事直接被开除!!
    我用几行 Python 自动化脚本完美解决掉了小姐姐的微信焦虑感
    从 Storm 迁移到 Flink,美团外卖实时数仓建设实践
    供应链管理学习心得
    解密京东智慧供应链
  • 原文地址:https://www.cnblogs.com/OutOfControl/p/9646821.html
Copyright © 2011-2022 走看看