Bottom Page

Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Pycharm shortcuts and operators don't run
Hi everyone,

Complete rookie here so please excuse the very simple questions.

1. The operator such as 5+5 or 10/2 gives no ouput. I get error message such as "statement seems to have no effect". Print functions run fine.

2. The shortcuts such as Run Shift+F10 do not work. (Im using a windows 10 home, 64bit Lenovo, with scandinavian keyboard.)

Thanks in advance.
Quote:The shortcuts such as Run Shift+F10 do not work.
The first time a script is run, it has to be done differently.
Click on the run menu, and select 'Edit Configurations...'
Make sure the proper interpreter is set up.
Then Click on the run menu again, select run, and click on your script.
After you do that the first time, the script will show up in the pull down menu on the top right
and Shift F10 should work as well.
Pycharm is for writing programs or scripts that you can save, not for immediate execution, so if you enter

5 + 5
you will get nothing. either when you run it or use Shift + f10. You would need to 'write' an actual script in order to run it. For example:

adding = 5 + 5
dividing = 10 / 2

will produce:

10 5.0 Process finished with exit code 0
when run.  If you want immediate gratification, you can use the command line (by typing 'python' in the command terminal. Like so:

Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 5 + 5
>>> 10 / 2
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Hi and thanks for your responses.

@sparkz_alot, good to knnow, thanks for sharing.

@Larz60+ Followed your intructions, not working still though.
"Make sure the proper interpreter". How do I know which is the proper one? I downloaded Pycharm Community Edition 2017.2.3 and the interpeter options i get is Python 3.5.1 and 3.6.1. Tried both.
But you can indeed run your code from within PyCharm while developing.
Quote:"Make sure the proper interpreter". How do I know which is the proper one?
click on 'help' menu, type settings and press enter.
look for project interrupter, If you don't see the python version you are using, add it and make sure it's selected
With Pycharm, for running the file displayed on the screen, you must type ctrl  + shift  + F10.  Sylas
Quote:With Pycharm, for running the file displayed on the screen, you must type ctrl  + shift  + F10.  Sylas
Thats one way to go about it, but you can also run from the run menu, or from clicking green arrow next to  the combo box on top right

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Trying Comparison Operators PythonGainz 3 273 Mar-28-2020, 10:46 AM
Last Post: PythonGainz
  Mathematical Operators in String AgileAVS 1 271 Mar-04-2020, 04:14 PM
Last Post: Gribouillis
  A doubt with 'in' and 'not in' operators with strings newbieAuggie2019 7 489 Oct-23-2019, 03:11 PM
Last Post: perfringo
  understanding exponential and bitwise operators srm 1 493 Jun-15-2019, 11:14 AM
Last Post: ThomasL
  IDLE keyboard shortcuts tam 2 725 May-15-2019, 06:34 AM
Last Post: tam
  please help with this question about using operators to multiply a string? GilesTwigg 3 1,023 Feb-27-2019, 04:13 PM
Last Post: ichabod801
  Understanding compound operators -= NewatCode 3 840 Apr-25-2018, 05:03 PM
Last Post: Larz60+
  Converting an 8-bit binary to decimal WITHOUT the shortcuts EIA 5 2,584 Dec-01-2017, 09:04 AM
Last Post: stranac
  Identity Operators and basic Forum etiquette. Boogachomp 3 1,053 Oct-08-2017, 12:02 AM
Last Post: sparkz_alot
  Automatically read copied text from keyboard shortcuts Ambidexter2017 10 4,895 Mar-10-2017, 01:46 PM
Last Post: wavic

Forum Jump:

Users browsing this thread: 1 Guest(s)