Struggling to write if/else statements with variable ranges
I am looking to write some code for a structural connection design template. One of the things that needs to be checked is plate geometry. More specifically the distance from the centerline of a bolt hole to the edge of the plate the hole is in. The table below outlines the general parameters I am trying to meet.

lets call the bolt diameter "d" and the min edge distance "x",
for 0.5 <= d <= 1
if x >= d + 0.25 then return "meets spec". if not then return "violates spec"
for 1 < d <= 1.25
if x >= d + 0.375 then return "meets spec". if not then return "violates spec"
for d > 1.25
if x >= d * 1.25 then return "meets spec". if not then return "violates spec"
Basically, I want to put in various values for "d" and "x" and have it tell me whether or not I meet the spec per the rules above. I feel like this should be rather simple to code in but I have no coding experience so I am struggling hard with it.

Above is a snippet of the code I have tried to write for it (note that "x" = "lev" in the actual code

