SQLzoo Solutions: SELECT Basics (MySQL)

Answers to the SELECT Basics tutorial of SQLzoo. 1. Show the population of Germany 2. Show the per capita gdp for each country where the area is over 5,000,000 km2 3. Show the name and continent where the area is less then 2000 and the gdp is more than 5000000000 4. Show the name and the population for ‘Denmark’, ‘Finland’, ‘Norway’, ‘Sweden’ 5. Show each country that begins…

Python: Collatz Conjecture

Today’s exercise from thekarangoel’s huge list of github projects. The Collatz Conjecture is defined as follows: Start with a number n > 1. Find the number of steps it takes to reach one using the following process: If n is even, divide it by 2. If n is odd, multiply it by 3 and add…

Python: Split a string

This code snippet is a solution to the Better Splitting task in the problem set of Unit 4 of Udacity’s Introduction to Computer Science. It will split up a given string source according to whichever characters are specified in splitlist.

Mathematic Proof and Logical Reasoning

I’ve mentioned that one of the courses I’m following currently is Keith Devlin’s Introduction to Mathematical Thinking on Coursera. Maths is something I was never interested in and never considered myself to be ‘good’ at (hence this blog’s tongue-in-cheek name). Getting yourself out of a mentality where you’ve convinced yourself you’re weak at something or…