Notebooks vs IDE
As an aspiring data scientist, I get to learn a lot of new things and while in my previous blog, I was able to mention that I had taken Python programming before, I am only familiar with coding using IDE and using text editor app like notepad++ and sublime. But recently I found out about notebooks!
Notebooks are very cool. They were very effective to use when teaching. Our IM, Sir Myk, and Junior DS, Shane, both used notebook when they were teaching us.
What I like with notebooks is that you can have a portion for texts including formats such as heading, subtitle, bold face, italicized and more. It will not interrupt at our code at all.
As you can see, using notebook, I was able to organize my code. So that it will be easier to understand. I have a title, and labels for each section of the code. I was able to compartmentalize my codes so that I can easily find errors when I try to run it, however, the down side of doing that is that I have to run the other cells as well. Nevertheless, it is a neat way to present my codes.
Let’s test my quiz!
It works well! I even got a perfect. As my app told me, I’m a walking atlas!
Now when I presented my code, I was told that I could make use of the functions in order to make my code better. This time I will be using Spyder, an IDE, to recreate my codes with the suggested modifications.
I was able to modify the code at Spyder. In Spyder, I have no option to create a text field with customizable fonts and styles, however I tried to make do using comments. For multiple line comments, I just have to enclose it with three quotation marks on both ends, while on single line comment, I just have to put a hash prior to the comment.
What I really like about using Spyder is that it the color varies for variables. It makes it really easy to identify.
I also really liked the variable explorer part, wherein I can see the summary of the variables that I declared. I especially loved it because it showed me the placeholder for my score, which is a list called ‘correct’. I have never printed it anywhere in my code, so it’s good to see that it is working well on the background.
Like colab, it has a built-in interface where you can run the codes (not sure if all notebooks do that), but as I tell you, this is very convenient as compared to having to run the code in cmd or terminal.
Overall, I think both tools are great, but if you really have to ask me, I prefer the Spyder because I can explore the variables. I think it is a really helpful function.
Bonus: i have uploaded my notebook and my work in spyder at my git hub
Check out this link: https://github.com/ftwqueenie/the-capital-quiz