top of page
Prostate Gland releases PSA molecules (15).png

INSTALLING PYTHON

Rosalind problems can be solved in any programming language, but the project encourages the use of Python due to it's simplicity, efficiency and versatility.

​

If you don't have Python installed, go to the website, click on the downloads tab and select the operating system (Windows, macOS, Linux) that runs on your device and download the latest version of Python. If you require further assistance have a look at the Beginner's Guide.

​

MacOS Video Tutorial for Python 3 Installation

Windows Video Tutorial for Python 3 Installation

 

After successfully installing Python, you may want to use a code editor rather than the default IDLE Python shell on your device (it is rather ugly and awkward to work with). There are many options, I recommend Pycharm but there are gazillions of other code editors that work just as well.

​

Moving onto the Rosalind problem, type 'import this' into your code editor or interpreter and you'll see the Zen of Python pop up. The Zen is a pithy collection of guiding principles when writing Python code so your code is consistent, easy to understand and fun! Here is an excellent guide to what the Zen means.

​

< >

import this

Output:

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Copy and paste the Zen of Python onto the Rosalind answer terminal and submit. And there's that! You completed your very first Rosalind puzzle, get yourself a cookie.

Subscribe to my mailing list and never miss a blogpost or new puzzle!

  • White Instagram Icon

Thanks for submitting!

bottom of page