Code Self Study Forum

Python Questions

Hi Josh

Thanks for your email. Here i would like to attach some print screen files to check with you about the sample questions that i ran at PyCharm it shows some errors even though i follow the syntax from the tutorials. Can you please kindly go through it and let me know. Thank you.



1 Like

Hi Chung,

Welcome to the forum!

It looks to me that your error is coming from a different file than what you have open.
It appears that you have more than one file named, in different directories, and that you’re running the one that is in Pycharm’s open directory (not pictured in the screenshot).

1 Like

That looks like the problem. To fix it, you can run the program in the current tab by pressing ctrl-shift-F10.

Pycharm is running the file here (probably open in the tab all the way on the left):


You can tell where that file is by the output at the bottom:

The editor tab is showing the file here:

C:/Users/Chung/Desktop/python practice/

You can tell where the file in the tab is located by the “breadcrumbs” at the top: