Define functions in Python

Lesson 17/20 | Study Time: 10 Min
In Python a function is defined using the def keyword

How to write a function

    How to call a function - Of course, if we have created a function, we need to use it somewhere by calling it right? ;)

    Let's see how to write a function that would convert bitcoin into USD 

      Note: The tutor used some other user-friendly local Python IDE (similar to Colab or Jupyter notebook), so don’t press the panic button looking at the new coding interface. You can comfortably run the same code on colab/jupyter notebook (or any python environment) and it will work.

      GDPR

      When you visit any of our websites, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and manage your preferences. Please note, that blocking some types of cookies may impact your experience of the site and the services we are able to offer.