Answer:
In Python:
def returnERA(runs,total):
ERA = runs *9/total
return ERA
Step-by-step explanation:
This defines the function. It receives the number of runs and the total runs as its parameters
def returnERA(runs,total):
This calculates the ERA
ERA = runs *9/total
This returns the ERA
return ERA