Testing with PICT, but incomplete testcases -
I am testing the problem of a triangle in PICT I am testing if the triangle is an equilateral triangle, an isosceles triangle , Or a scalin triangle. The problem is that as a result, I never get the equilateral triangle
side 1: 5,6,7,8,9,10 side 2: 5,6,7,8,9,10 Side 3: 5,6,7,8,9,10 Type: ([side1] = [side 2]) or ([side 2] = [side 3]) Or ([side 3] = [side 1])) then [type] = "isosceles" EL Sai [type] = "Skailin"; If [[type 1] = [side 2]) and ([side 2] = [side 3]) and ([side 3] = [side 1]) then [type] = "occasional"; But the random thing is that when I change the last line in
IF (([side1] = [side2]) and ([side 2], = [Side 3]) and ([side 3] = [side1])) then [type] = "isosceles"; I get random values, resulting in an equilateral triangle How can I ensure that I have these values in the right code? < / Div>
Try this:
side 1: 5,6,7,8,9, 10 Side 2: 5,6,7,8,9,10 Side 3: 5,6,7,8,9,10 Type: Equatorial, Occasional, Scalene IF (([1] = [Side 2] and [ Side 2] <[side 3]) or ([side 2] = [side 3] and [side 3] <[side 1]) or ([side 3] = [side 1] and [side 1] <
[side 2]), then [type] = "isosceles"; if (([side 1] = [side 2]) and ([side 2] = [side 3]) then [type] = "occasional"; if ([side1] << [side 2] and [side 2] The reason for this is that your argument overlaps between the cases, you will clarify your terms as there was only one outcome for each case. Example of work above; I validated it best wishes!
Comments
Post a Comment