+ 2

The data for batting and it is related to module package: 1- for 1 point in 2 runs,2- for half-century additional 5 points

Is my syntax is correct? Def batting(run, half-century): For i in range(1,run+1): If i%2==0: Print("run:",i,"1 points") While For i in range(1, half-century+1): If i%50==0: Print("half-century:",i,"+5 points)

31st Jan 2020, 3:32 AM
Utsav Singh
Utsav Singh - avatar
1 Réponse
+ 1
I have no idea what the code was about, but apart from "auto-capitalize first character" problem, these two need some attention: * `half-century` is not a valid name for argument/variable * Indentation problems, the lines forms a wall of code. Python hates unindented codes. You better fix it or Python will strangle and bite : )
31st Jan 2020, 3:52 AM
Ipang