Since the question wants you to compare values for greater than the inputs x and y should not be single bits but should instead be a vector, so they can be more than just 1'b1 and 1'b0.
If they are supposed to be 1-bit then the assignment z = ~y + x is wrong since adding won't tell you if x >= y
It should be simply z = ~(~x & y); // result is 0 only if x < y, otherwise if x==y or x>y it is 1