On June 14, 1777, the Continental Congress resolved that the flag of the United States would have 13 alternating red and white stripes, with the states represented as white stars on a blue field. The CountryData data paclet has information about this and many other flags, as can be seen in the “Country Flags and Descriptions” Demonstration.
If you’d like to test your knowledge of national flags, there is also a “Country Flag Quiz” Demonstration that you may download for free. Both of these Wolfram Demonstrations show off the power of the CountryData paclet. For example, Mathematica can analyze all those flag descriptions.
The code above gives a table of the number of times a particular color is used in a flag description. The three most-used colors in the flags of the world are red, white and blue.
Nineteen national flags include “isosceles” in their descriptions, and a bit of code can display them all.
Substituting “shield” for “isosceles” gives all the flags with shields.
The simple code below shows how similar two flags can be:
Mathematica is used in almost every country of the world, and even sometimes in outer space. Whatever your flag may be, I hope you’ve had fun with this piece of flag analysis.