# for a schematic response, submission[i] is the json representation # of the diagram and analysis results for the i-th schematic tag def get_tran(json,signal): for element in json: if element[0] == 'transient': return element[1].get(signal,[]) return [] def get_value(at,output): for (t,v) in output: if at == t: return v return None output = get_tran(submission[0],'Z') okay = True # output should be 1, 1, 1, 1, 1, 0, 0, 0 if get_value(0.0000004,output) < 2.7: okay = False; if get_value(0.0000009,output) < 2.7: okay = False; if get_value(0.0000014,output) < 2.7: okay = False; if get_value(0.0000019,output) < 2.7: okay = False; if get_value(0.0000024,output) < 2.7: okay = False; if get_value(0.0000029,output) > 0.25: okay = False; if get_value(0.0000034,output) > 0.25: okay = False; if get_value(0.0000039,output) > 0.25: okay = False; correct = ['correct' if okay else 'incorrect']
  1. num = 0
    while num <= 5:
        print(num)
        num += 1
    
    print("Outside of loop")
    print(num)