Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codes does not work
#1
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
Reply
#2
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:
Reply
#3
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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#4
Yeah, you're right, tnx.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I work this codes in Windows? herace 4 3,312 Jul-07-2019, 06:16 PM
Last Post: herace

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020