Computer Science, asked by reyansh001, 7 months ago

Consider the following code segment for the questions a= int(input("enter an integer")) b=int(input("enter an integer")) if a<=0: b=b+1 else: a=a+1 if a>0 and b>0: print("W") elif b>0: print("X") if b>0: print("Y") else: print("Z") What letters will be printed if the user enters 0 for and and 0 for b

(1 Point)

only X

only Y

W and X

W, X and Y​

Answers

Answered by sharmashrey629
5

Answer:

only y as a=0 give a=a+1 which give 1 so a become 1 and b reamin 0 hence according to given condition answer must be only Y

Similar questions