📜  def batting(balls,runs): points=runs 2;如果运行>50:点=点+5;如果运行>=100:点=点+10;罢工率=跑球;如果罢工率>=80 并且罢工率<=100:积分=积分+2; elif 击球率>100:点数=点数+4; print(points) - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:05.625000             🧑  作者: Mango

代码示例1
def batting(balls,runs):
 points=runs/2;
 if runs>50:
  points=points+5;
  if runs>=100:
      points=points+10;
strikerate=runs/balls;
if strikerate>=80 and strikerate<=100:
    points=points+2;
elif strikerate>100:
    points=points+4;
    print(points)