Question: Getting this error for the below code - get _ minimums ( - 1 , 'Pattern',False,False,True,minimums ) returned [ 5 0 0 . 0 ,
Getting this error for the below code getminimums'Pattern',False,False,True,minimums returned but should have returned None.
def getminimumscert area, instructed, vfr daytime, minimums:
matchingrows
#find matching rows
for row in minimums:
# Check if the row matches the given conditions
if cert PILOTCERTIFIED and row 'Certified' or
cert PILOTHOURS and row Hours' or
instructed and row 'Dual' or
row area or
vfr and rowVMC or
not vfr and row 'IMC' or
daytime and row 'Day' or
not daytime and row 'Night':
matchingrows.appendrow
#None for no matching rows
if not matchingrows:
return None
ceilingindex
visibilityindex
windindex
crosswindindex
bestceiling getbestvaluematchingrows, ceilingindex, maximumFalse
bestvisibility getbestvaluematchingrows, visibilityindex, maximumFalse
bestwind getbestvaluematchingrows, windindex, maximumTrue
bestcrosswind getbestvaluematchingrows, crosswindindex, maximumTrue
return bestceiling, bestvisibility, bestwind, bestcrosswind
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
