21. Oct 2020 |

Python OOP – objektorienteeritud programmeerimine

Kuna ma ise sellega olin aasta tagasi üsna hädas, sest pea lihtsalt ei võtnud seda abstraktsiooni nii lennult, siis laia pintsliga kirjutasin siia (võimete piires) natuke selgitustega töötavat objektorienteeritud Pythoni koodi:

github.com/robineero/my-python-jam/tree/master/oop-jam

Mõni objekt, mõni meetod ja natuke funktsionaalsust. Ehk on kellelegi veel abiks, kes aru ei saa, kuidas objektid töötavad. See võib sisaldada vigu igal pool aga noh, see ongi jam.

16. Nov 2019 |

Pentabonacci and other N-bonacci numbers

I had Python test on friday and one of the tasks was related to calculating pentabonacci numbers. I was not able to solve it because I did not know the meaning of the word. But it is actually really simple task that can be solved with a list and sum of list elements. You can find some information here and on GeeksForGeeks (by the way, it is really good explanation!)

4. Sep 2019 |

W292 no newline at the end of file – how to fix

This is PEP8 error if you do not add an empty line to the end of your file.

Introduction excercise coded in Python 3. Pay attention to line 21.

Add an empty line to the end of your .py file (like in the picture line 21). Without any indent. This is it!