Question: Using the followin Anaconda Spyder algorithm, create 3 desk checks for the following 3 inputs: colors2res(('VT','YE','RD','GN')) , colors2res(('VT','YE','RD','-')) , colors2res(('VT','GD','RD','GN')) def colors2res (tuple): sigfig={'-':'-','PK':'-','SR':'-','GD':'-','BK':0,'BN':1,'RD':2,'OG':3,'YE':4,'GN':5,'BU':6,'VT':7,'GY':8,'WH':9} mult={'-':'-','PK':10**(-3),'SR':10**-2,'GD':10**-1,'BK':10**0,'BN':10**1,'RD':10**2,'OG':10**3,'YE':10**4,'GN':10**5,'BU':10**6,'VT':10**7,'GY':10**8,'WH':10**9}

Using the followin Anaconda Spyder algorithm, create 3 desk checks for the following 3 inputs: colors2res(('VT','YE','RD','GN')) , colors2res(('VT','YE','RD','-')) , colors2res(('VT','GD','RD','GN'))

def colors2res (tuple): sigfig={'-':'-','PK':'-','SR':'-','GD':'-','BK':0,'BN':1,'RD':2,'OG':3,'YE':4,'GN':5,'BU':6,'VT':7,'GY':8,'WH':9} mult={'-':'-','PK':10**(-3),'SR':10**-2,'GD':10**-1,'BK':10**0,'BN':10**1,'RD':10**2,'OG':10**3,'YE':10**4,'GN':10**5,'BU':10**6,'VT':10**7,'GY':10**8,'WH':10**9} perc={'-':20,'PK':'-','SR':10,'GD':5,'BK':'-','BN':1,'RD':2,'OG':0.05,'YE':0.02,'GN':0.5,'BU':0.25,'VT':0.1,'GY':0.01,'WH':'-'} try: s=(sigfig[tuple[0]]*10+sigfig[tuple[1]])*mult[tuple[2]] t=perc[tuple[3]] return (s,t) except: return (float('nan'),float('nan'))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!