Python Forum

Full Version: Codes does not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I just started using PyCharm and after some tries, the program just stucked at the preveous activity.
Since then, I have closed the program, restarted my computer, and still, the code does not work, and I have checked myself many times.
Adding a link to the picture for you to uderstand.
https://photos.app.goo.gl/jwDoZ8Ewi4BJtpex9
In the future please use code tags, not images or references to images, see: bbcode
age is a string, so must be converted to integer before comparison, so change line 3 to read:
    if int(age) > 15:
You have 2 open tabs (i.e. 2 open files)
Natalie Test1.py and Test.py.
You are running the former. Check this link
https://www.quora.com/How-do-I-run-Pytho...in-PyCharm
I guess you just hit the green triangle and you expect that your file Test.py will run, but you need to select it from the dropdown.

In addition your Natalie Test.py file has an error
Yeah, you're right, tnx.