0

I cant see output in both terminal and output

Here is an example

Here is an example

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
awab
  • 23
  • 4
  • 1
    Switch to the "OUTPUT" tab. Also, please post the code as text and not links to images. As a new contributor, you may want to read [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and enjoy the [site tour](https://stackoverflow.com/tour). – The Amateur Coder Jan 25 '22 at 04:04
  • 2
    you have to type something, put a print as the first line, what you get back is a string not an int – rioV8 Jan 25 '22 at 04:06
  • 1
    @TheAmateurCoder i cant see my output in the ouput tab as well, sorry about wont do that again. – awab Jan 25 '22 at 04:07
  • @awab, sorry, I didn't notice that you were not checking it properly. `input()` returns a string and not an integer, as @rio has stated. You can replace `if dw == 3:` with `if dw == "3":`. – The Amateur Coder Jan 25 '22 at 04:12
  • 2
    Put something inside `input(...)` (ex. `input("Please input value: ")`) so you can see the prompt, and not just a blank/empty line which looks like nothing. – Gino Mempin Jan 25 '22 at 04:15

2 Answers2

0

Modify your code like this

dw = input("enter a value: ")

if dw=='3':
    print('Right!')

Then hit the triangular play button at the top right corner, switch to the TERMINAL tab.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
raiyan22
  • 1,043
  • 10
  • 20
-1

I encountered similar problems in vscode, the solution is to just press the delete icon on the terminal and run the code again

Image

buddemat
  • 4,552
  • 14
  • 29
  • 49