Setting a condition to numbers in a list

Hi,

How to make a condition?

if a number in a list is >=2, then 2, if <2, then continue the number.

One possible way is to use the ternary operator ?: in a code block like this:

2 Likes

Thanks again.

And how to make with more conditions?

x<1000, then x+200
1000<x<2000, then x+30
2000<x3000, then x+40

Hello, you could nest them, but it gets a bit messy:

2 Likes

Thanks buddy…

Working!