- Pycharm - Home
- Pycharm - Introduction
- Pycharm - Installation
- Pycharm - Understanding Basics
- Pycharm - Keymaps
- Pycharm - Shortcuts
- Pycharm - Omni
- Pycharm - Macros
- Pycharm - Micros
- Pycharm - Improving & Writing Code
- Pycharm - Console
- Pycharm - Interpreters
- Pycharm - Debugging & Breakpoints
- Pycharm - Integration of Version Control
- Pycharm - HTML & CSS Integration
- Pycharm - JavaScript Support
- Pycharm - Tips
- Pycharm - Database Tools
- Pycharm - Exporting Data
- Pycharm - Web Frameworks
- Pycharm - Django
- Pycharm - Pyramid
- Pycharm - Flask
Pycharm - Console
PyCharm has a full-fledged Python console with full code completion which is available in the option menu Tools -> Run Python Console.
Consider the code which was mentioned in the previous chapter, as shown below −
message = 'GIEWIVrGMTLIVrHIQS' #encrypted message
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for key in range(len(LETTERS)):
translated = ''
for symbol in message:
if symbol in LETTERS:
num = LETTERS.find(symbol)
num = num - key
if num < 0:
num = num + len(LETTERS)
translated = translated + LETTERS[num]
else:
translated = translated + symbol
print('Hacking key #%s: %s' % (key, translated))
Now, let us run the code with the help of console to execute the script for getting the desired output, as shown below.
You can observe the output as shown below −
Advertisements