Basic Calculator

I submitted my code on basic calculator but only the first two test cases were correct. After repeated failed attempts, I downloaded the testcases and the 3rd testcase input and output was given as follows:
Input:
+
1
2

1
2
*
1
2
.
/
1
2
x
Output:
Invalid operation. Try again.
Invalid operation. Try again.
2
8

How are the first two operations invalid?

Ishita, I think there is some confusion regarding the output,
Input :
+
1
2

1
2
*
1
2
.
/
1
2
x

The output is :
3
-1
2
Invalid operation. Try again.
0

Plz check it again, I have downloaded the test cases.