%-------------------------------------% % Homework 3: problem 3.4 % % Date: 9/30/02 % % % % Gun Srijuntongsiri % % gs61 % % ?????? % %-------------------------------------% % Ask for input of x and y x = input('Enter x : '); y = input('Enter y : '); % First, branch on the sign of x if x>=0 % Then, on the sign of y if y >= 0 fun = x+y else fun = x+y^2 end else % x < 0 % Again, branch on the sign of y if y >= 0 fun = x^2 + y else fun = x^2 + y^2 end end