<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Python on cpmachado</title>
    <link>https://cpmachado.pt/tags/python/</link>
    <description>Recent content in Python on cpmachado</description>
    <language>en-gb</language>
    <managingEditor>cpmachado@protonmail.com (Carlos Pinto Machado)</managingEditor>
    <webMaster>cpmachado@protonmail.com (Carlos Pinto Machado)</webMaster>
    <copyright>cpmachado © 2026</copyright>
    <lastBuildDate>Tue, 30 May 2023 18:37:46 +0100</lastBuildDate>
    <atom:link href="https://cpmachado.pt/tags/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Counting integer divisors</title>
      <link>https://cpmachado.pt/posts/2023-05-30-python-for-counting-number-of-integer-divisors/</link>
      <pubDate>Tue, 30 May 2023 18:37:46 +0100</pubDate><author>cpmachado@protonmail.com (Carlos Pinto Machado)</author>
      <guid>https://cpmachado.pt/posts/2023-05-30-python-for-counting-number-of-integer-divisors/</guid>
      <description>&lt;p&gt;TL&amp;amp;DR: Although I&amp;rsquo;ve been using Python for years, its set notation still&#xA;amazes me for its expressiveness. In this case to count integer divisors,&#xA;given a specific predicate.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 class=&#34;heading&#34; id=&#34;context&#34;&gt;&#xA;  Context&#xA;  &lt;a href=&#34;#context&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;This semester I&amp;rsquo;m doing a course on &lt;a href=&#34;https://guiadoscursos.uab.pt/en/ucs/matematica-finita/&#34;&gt;Discrete Mathematics&lt;/a&gt;.&#xA;I had an exercise to count integer divisors of a given number, which weren&amp;rsquo;t&#xA;divisible by another given number.&lt;/p&gt;&#xA;&lt;p&gt;To verify my reply, which involved a bit more of analysis, Python enabled me&#xA;to write a quick script that could do it.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
