Sunday, August 7, 2016

The Code 7 Project - Problem 5 - Pascal Triangle

(Build Schema.  Run SQL.  Pascal triangle row values in tables below.)
The Code 7 Project - Problem 5 - Pascal Triangle

As usual, you can see my code and run it online without installing anything special!9/87f0d/3 

For problem 5 from this website, my basic goal was to use SQL to create and access values from a math construct called Pascal's triangleYou can choose a row number (i.e. which row in the triangle to look at), and then you receive the values in that row, output in the form of a table.  My code is programmed using the MySQL dialect of SQL, based on the available online compiler that I used.

If you go to that sqlfiddle link for the code, it should automatically run and print out a few tables (the "val" columns are the values that correspond to their respective rows in Pascal's triangle).  I used the online “sqlfiddle” website to create the MySQL table and client because it seemed easier to use than the corresponding TutorialsPoint website.

I found this YouTube video really helpful in figuring out how to get the fiddler website to work (change the “‘;” in the blue button to “//“):   

More info on the "Code 7 Project":


A separate side-project:  "Cognate Language" in Python code.  

Description at the GitHub readme file:

And most up-to-date versions of files: 



Original Art

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics