Problem Solving: Counting Valleys
This problem is extracted from HackerRank: Counting Valleys. Its rating is Easy. We will be using Python 3 to solve this problem. Do try to solve it yourself first in HackerRank before peeking at the solution. 🙂
This problem is extracted from HackerRank: Counting Valleys. Its rating is Easy. We will be using Python 3 to solve this problem. Do try to solve it yourself first in HackerRank before peeking at the solution. 🙂
For every problem, there could be more than one way to solve it. To understand Object-Oriented Programming (OOP) and use it to its best utility, we need to understand some basic principles. The best way to demonstrate that is by example. Problem Statement Suppose in my system, I have to keep track of credit card… Read More A Simple Guide to OOP in Python 3
I’ve dabbled with Flask apps last year, but only for awhile, and only for personal projects. I have always been resistant when it comes to using Python 3, instead of Python 2. This is because many packages were written in Python 2, and had limited support in Python 3. It seems like it’s not the… Read More Flask Apps with Python 3
The job of a software engineer or a coder is very much coveted these days, especially in giants like Google and Facebook. If you do not have a degree in Computer Science or the like, you may be wondering what you should expect when you start learning coding. Having taught a gamut of IT subjects… Read More So You Want to Learn Coding. Here’s What You Need to Know
Suppose you’d like to create thumbnails for your images of a specific size, say 128×128. Because this is a square image, any non-square image will be scaled out of proportion if you simply apply the resize method on it. To maintain aspect ratio for your images, you might like to use the following code: I… Read More Python: Resizing Images (Part 2)
Sometimes you have a buttload of images that you need to resize, but are unwilling to spend the time to do so manually. What to do? Write a script to automate it! Suppose you’d like to resize them by a certain proportion, here’s a code snippet that you can follow: I am currently using Python… Read More Python: Resizing Images (Part 1)