Formula (Loop)

Hello Everyone,

I am new to Dynamo and i am still learning. I am looking for a formula (Looping) that can look like this:

if “X” is 125
    if y > 150 then ="A",
    if y < 130 then ="B",
if “X” is 160
    if y > 200 then ="A",
    if y < 180 then ="B",
if “X” is 250
    if y > 430 then ="A",
    if y < 280 then ="B",

Thanks in Advance!

what are x,y,a,b? pls show input and output

Hi @Tomasz_Puchala

Here is my attempt so far. I am getting empty list. Thanks for your help.

@craig can you manually type how you want to result to look like?

@craig Need more clarity on the expected result.
Meanwhile see if this helps…
xyz.dyn (2.5 KB)

def x125(y){
return = y>150?"A":(y<130?"B":"C");

def x160(y){
return = y>200?"A":(y<180?"B":"C");

def x250(y){
return = y>430?"A":(y<280?"B":"C");

def z(x,y:var[]){
return = x==125?x125(y):(x==160?x160(y):(x==250?x250(y):0));