Help with logic scripting

Morning all,

I am trying to get my python script node to do a certain function but I just can’t figure it out. So, what I am trying to do is I have a list of numbers and I am trying to capture each one of them to follow a certain conditional statement and if each one qualifies then y will be appended accordingly for each index.

the code that I am using is as follow:

python%20script

x = IN[0]
y=

for m in x:
if m <=1500:
y.append(180.20)

elif m>1500 and m<1600:
y.append(221.00)

elif m >=1600 and m<=2000:
y.append (221.00)
else:
y.append("please re-conider your design")

OUT=y

thank you in advance

The script works without problems, what do you want to achieve? Can you make an example with inputs and outputs?

Can you state what your problem is? And a Dynamo graph so we know what the inputs look like and the context of the script? Just seeing some code with 0 context won’t help anyone figure out what you want.

All looks fine here :slight_smile:

Thank you guys for the rapid reply.

I had an error earlier but it seems that the code is working just fine. Apologies for wasting your times. I am just new to python, so I need to double check with the experts :slight_smile: