Problem with input() function in Visual Studio Code

Why is “Visual Studio Code” input() function using the code in line 2 as input? And how do i avoid this? I am running the code using shift+enter. Meaning i run the entire thing at once. I am new at coding.
Code

1. x = int(input('Enter integer value: '))
2. print(x)

Terminal Result

>>> x = int(input('Enter integer value: '))
Enter integer value: print(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'print(x)'
>>>