Python vscode problem

I entered code properly but correct output is not showing and game is not starting. One time it showing stdin line 1 invalid syntax infact line 1 is import random Other times it not displayingmatter of game i inserted in user and computer input("")

Please post your actual code instead of a screenshot. Thanks.

how to share my vscode input here

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

How exactly are you running the code? You should be able to just select (click it) the file in the explorer on the left and then click the run button :arrow_forward: (you can pick either option from there).

Also, you didn’t actually invoke the play function.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.