[{"content":"Time ago, I was introduced to solve Pascal’s triangle. For reference, see following link on Wikipedia. Technically is an interesting exercise for programmers, where functions and recursion comes into rescue.\nHere is an image that helps better understand the Pascal’s triangle and how it’s created.\nPascal’s triangle. Source: Wikipedia.\nMy algorithm is posted on this gist.\nYou can see below the code running in repl.it, press the Play button.\nApproachThe core reasoning of my solution is to have the ability to calculate any position being displayed. I discarded the use of arrays, I just think they are not worth on this case.\nI like the approach I use because it has been educational to use “recursion” again. See, there are 3 functions, but in the algorithm, only one function returns a value 1 (one); with that, it’s calculating any position requested.\nBy doing it the way I did, the algorithm can virtually calculate any number of lines you set. One disadvantage you will realize in a moment, it’s that absolutely each “previous” position has to be calculated.\nSource Code # what is Pascal\u0026#39;s triangle? # https://en.wikipedia.org/wiki/Pascal%27s_triangle number_of_rows = 11 def print_triangle_row(rows:int, current_row:int): one_line= \u0026#34;\u0026#34; # iterate on current_line for column in range(0,current_row): value = calculate_position(rows,current_row,column) one_line += f\u0026#34;{value}\\t\u0026#34; print(f\u0026#34;{one_line}\u0026#34;) if current_row \u0026lt; rows: print_triangle_row(rows,1+current_row) else: return def calculate_position(rows:int, current_row:int, current_column:int): if current_row \u0026lt;= 1 or current_column == 0 or current_column == (current_row-1): return 1 return calculate_position(rows, current_row-1, current_column-1) + calculate_position(rows, current_row-1, current_column) def pascal_triangle(rows:int): if rows \u0026gt; 0: print_triangle_row(rows,1) else: print(\u0026#34;Error!\u0026#34;) pascal_triangle(number_of_rows) print(\u0026#34;terminamos...\u0026#34;) Have fun.\n","permalink":"https://palazuelos.dev/blog/pascal-s-triangle/","summary":"Time ago, I was introduced to solve Pascal’s triangle. Technically is an interesting exercise for programmers, where functions and recursion comes into rescue.","title":"Pascal’s triangle this has been updated to Hugo"},{"content":"Last updated: 2026-07-12\nCurrent status This site currently contains no affiliate links and receives no affiliate revenue. Nothing on this site earns the author a commission when you click it.\nThis page exists in advance of any affiliate content so that (a) the site-wide disclosure policy is established and public before any commercial link is added, and (b) readers can confirm at any point what the site\u0026rsquo;s relationship with commercial products is at that moment.\nPolicy for future affiliate links If affiliate links are ever added to this site, they will:\nBe labeled at the point they appear. Every affiliate link will be accompanied by a brief plain-language notice next to the link — for example, \u0026ldquo;affiliate link\u0026rdquo; — so that readers know before they click. Use rel=\u0026quot;sponsored nofollow\u0026quot; on the \u0026lt;a\u0026gt; tag, per search-engine guidelines and W3C conventions. Be described in the post they appear in. The post itself will state, in its own text, that specific links are affiliate links and to what program they belong. Not affect editorial content. Reviews and recommendations are written before any affiliate relationship is considered, and are not adjusted to favor products that pay a commission. If a product is recommended, it is because the author believes it is worth recommending. FTC compliance This disclosure is provided in accordance with the U.S. Federal Trade Commission\u0026rsquo;s Guides Concerning the Use of Endorsements and Testimonials in Advertising (16 CFR Part 255).\nWhen affiliate content is added, this page will be updated with:\nThe names of the affiliate programs the site participates in. The categories of products those programs cover. Any material connections between the author and product vendors beyond the affiliate commission itself. Contact Questions about this policy can be raised as a GitHub issue on the site\u0026rsquo;s public repository.\n","permalink":"https://palazuelos.dev/disclosure/","summary":"Disclosure of affiliate relationships, per FTC 16 CFR Part 255.","title":"Affiliate Disclosure"},{"content":"Last updated: 2026-07-13\nShort version This site does not set cookies, does not collect personal information, and does not track individual visitors. The only measurement is anonymous, aggregate page-view counting (described under Analytics below), which cannot be tied to you and does not follow you across sites.\nWhat data this site collects None from you directly. The site is a static blog: no accounts, no comments, no forms, no login. There is no code path on any public page that receives data you type or click.\nServer logs. When your browser requests a page, the hosting provider (Vercel) records standard request logs — IP address, user agent, requested URL, timestamp — for delivery, caching, and security purposes. These logs are subject to Vercel\u0026rsquo;s own retention and privacy policies. This site does not have access to those logs.\nCookies This site does not set cookies. Your browser will not receive a Set-Cookie header from any page under this domain.\nIf a future page ever needs cookies (for example, remembering a theme choice that you set yourself), that will be a first-party functional cookie only, and this page will be updated to describe it.\nAnalytics This site uses Vercel Web Analytics to count page views in aggregate. It is cookie-free and does not track individuals: no persistent identifier is stored on your device, and visits cannot be followed across other sites.\nWhat it records per page view: the page URL, referrer, and coarse request attributes (country, device type, browser, operating system). Visitors are de-duplicated within a single visit using a short-lived hash computed from the incoming request; the hash is not stored long-term and cannot identify you. The data is only ever visible to the site owner as aggregate charts.\nThere is no advertising, no cross-site tracking, and nothing here requires a cookie consent banner — no cookies are set.\nThird-party embeds The site does not embed third-party trackers, social widgets, comment widgets, or advertising scripts. Images and other assets are served from the site\u0026rsquo;s own hosting and CDN.\nAffiliate links None currently. When affiliate links are added, they will be disclosed on every page they appear on, and covered in detail on the affiliate disclosure page.\nContact Questions about this policy can be raised as a GitHub issue on the site\u0026rsquo;s public repository.\nChanges Material changes to this policy will be reflected in the \u0026ldquo;Last updated\u0026rdquo; date at the top of the page.\n","permalink":"https://palazuelos.dev/privacy/","summary":"How this site handles your data.","title":"Privacy Policy"}]