1. Write the output of the following program lines?
2. Write the output of the following program lines?
3. What will be the output of the following program statements?
(a) a=5 a=25+4-4 print(a) (b) a, b, c=1,2,4 a+=4; print(int(a/2)) (c) a, b=0, 30 a=30/2 * b print(a) (d) b=30 a=30/2 * b print(“a=”,a) 4. Write two different forms of if statement. 5. Find the output of the following codes: y=1 x=7 x=x+2 if x==9: print(“Now the value of x is 9”) else: print(“The value of x never achieve 9”) 6. What will be the output of following program segment, if the input for variable var is given as: (a) ‘S’ (b) ‘M’ (c) ‘T’ (d) ‘W’ var="T" if var=="S": print("Sunday") elif var=="M": print("Monday") elif var=="T": print("Tuesday") else: print("Wrong choice")