zoukankan      html  css  js  c++  java
  • python学习:条件语句if、else

    条件语句:

      1.if...else...;

      2.if...elif...esle

    举例:

      1.if...else...

      “age_of_princal = 56

            guess_age = int(input(">>>>:"))
            if guess_age == age_of_princal:
            print("Yes,you got it")
            else:
      print("No,it's wrong.")”

      2.if...elif...esle...

      "score = int(input("score:"))

      if score > 90:
      print("A")
      elif score > 80:
      print("B")
      elif score > 70:
      print("C")
      elif score > 50:
      print("D")
      else:
      print("加油")"

  • 相关阅读:
    【leetcode】图像渲染
    【leetcode】不邻接植花
    052-75
    052-74
    052-73
    052-71
    052-70
    052-69
    052-67
    052-66
  • 原文地址:https://www.cnblogs.com/pl-2018/p/9382129.html
Copyright © 2011-2022 走看看