Dr Arron Lacey

Abstraction is a powerful tool to help remember concepts - but are foo, bar and baz?
Use abstraction in function and variable names
# Function definition is here
def epilepsyIncidence( numEpilepsy, Population ):
# Divide and return"
RateRatio = (numEpilepsy / Population)*1000
return RateRatio;
# Now you can call sum function
IncidenceRate = epilepsyIncidence( 10, 5145 );
print "The Incidence Rate Ratio for Epilepsy is : ", IncidenceRate, "per 10,000"
"The Incidence Rate Ratio for Epilepsy is : 19.4 per 10,000"


Learn more: Line Highlighting





Slides made with Quarto + revealjs

Data Science and AI Educator’s Programme