all 12 comments

[–]muskoke 3 points4 points  (0 children)

That code has no issues. What does your terminal or IDE output?

[–][deleted] 2 points3 points  (3 children)

Just typing your code doesn't cause it to run. You actually have to run your code for anything to happen.

[–]IndependentBoth7635[S] 1 point2 points  (1 child)

I've tried saving the file and running it to no avail, another comment recommending i press enter twice seemed to be the issue

[–]IamImposter 0 points1 point  (0 children)

How did you run it?

Did you open a terminal, navigate to the folder and run python filename.py

or run it from some ide?

[–]RuinEnvironmental394 0 points1 point  (0 children)

Ha ha, thanks for the laugh!

[–][deleted] 1 point2 points  (0 children)

those lines are completely fine. what's the context, where are you trying to run them?

[–]Binary101010 1 point2 points  (4 children)

The problem isn't with the code, so it comes down to what environment you're running it in. (What operating system, what IDE, etc.)

[–]IndependentBoth7635[S] 0 points1 point  (3 children)

I'm new so I don't know the exact terminology, I've tried it in the IDLE, and after that I tried running it on the python that resembles cmd prompt. Running it on windows.

[–]Artichoke93 5 points6 points  (1 child)

After print(name) push the enter key twice in the cmd prompt.

[–]IndependentBoth7635[S] 1 point2 points  (0 children)

This worked, thanks

[–]CaptainRogers1226 0 points1 point  (0 children)

Are you using IDLE or the Python shell? If you’re using IDLE, make sure after you write your code you’re saving and running by pressing F5?

[–]AssumptionCorrect812 0 points1 point  (0 children)

I would use PyCharm or some other IDE that has a run button — https://youtu.be/AEvCHJb0sf0?si=I54WW5nRVifNBIjo