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) code example
Example: 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)
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)