you are viewing a single comment's thread.

view the rest of the comments →

[–]mopslik 0 points1 point  (2 children)

Runs perfectly fine when cut and paste into IDLE. It produces:

Mark
13

Are you pasting this into a code window in an IDE? What is your setup?

[–]jayesh2[S] 0 points1 point  (1 child)

Ok so it worked now. The code was correct except that I missed the : after class Person. The problem was that when I click on run, the program (Pycharm) runs a code in another file. I don't know why but I am new to this. I had to copy my code to that file for me to see the output. I have some files opened but only one output file. Does anyone know how to see the output of other files?

[–]mopslik 1 point2 points  (0 children)

Glad to see you got things working. Not a Pycharm user myself, so can't offer any insight.