A > b > c

I’m trying to feed in wall duty ratings and work out if a wall type has equal or greater duty rating than required.

But although I’m not getting errors, I’m getting incorrect output.

Change your if statement to the below

“if rate in required”

also you should have IN[0] as a list of items otherwise it will go through every character.

I want to see if it’s equal or greater tho… not just equal.
And it’s checking the string in IN[0] as a whole, not looping through that bit.

Use a dictionary:

2 Likes

Either of the following may be of use:

That’s only giving you heavy = heavy…

I want to say, “I want a heavy duty wall” and it to say… you can use a heavy rated wall OR a severe rated wall.

1 Like

Thank you :slight_smile:

Except required wants to be equal or higher. (I swapped it in mine)…
Wait… that doesn’t make sense.

Why does it work that way round?

Ah… it’s because it’s telling me if the item in the list is equal or bigger…

My order is confusing

makes more sense now

If your list changes regulary, you can use indexing instead of a dictionary:

1 Like