Slide 19
Slide 19 text
To Scratch or Not to Scratch: Code by Hand
Missing Control Structures:
Indent Lines
for domain in domains:
if domain.domainType == ‘CodedValue’:
coded_values = domain.codedValues
for val, desc in coded_values.items():
if desc in (“High”, “Very High”):
dl = (domain.name)
print (“Found domain : “ + dl)
print (‘(0) : 910’.format(val,desc))
Interpret to code
It MOST LIKELY won’t run the first time…THAT’S OK!
for domain in domains:
if domain.domainType == ‘CodedValue’:
coded_values = domain.codedValues
for val, desc in coded_values.items():
if desc in (“High”, “Very High”):
dl = (domain.name)
print (“Found domain : “ + dl)
print (‘(0) : 910’.format(val,desc))