@LJ-9 (please reply to this issue when you have read your feedback)
The warmup
Looks alright, but you dont need the inner loop over c's instead if a,b can form a pythagorean triple they do so with c=sqrt(a^2 + b^2) and c will be integer. Also in your solution you dont get all triples with a,b< 10000 because you limit your search to c<10000, but c is the longest side in the triangle. In fact you would need to search up to around sqrt(2*10000^2). In summary it is much better to exploit that c=sqrt(a^2 + b^2) being an integer is equivalent with a,b,c being a triple.
The exercises
Looks very good! Instead of using the louvain method from the writeup you could also have plotted the network in which case the optimal clustering would be very apparent.
@LJ-9 (please reply to this issue when you have read your feedback)
The warmup Looks alright, but you dont need the inner loop over c's instead if a,b can form a pythagorean triple they do so with c=sqrt(a^2 + b^2) and c will be integer. Also in your solution you dont get all triples with a,b< 10000 because you limit your search to c<10000, but c is the longest side in the triangle. In fact you would need to search up to around sqrt(2*10000^2). In summary it is much better to exploit that c=sqrt(a^2 + b^2) being an integer is equivalent with a,b,c being a triple.
The exercises Looks very good! Instead of using the louvain method from the writeup you could also have plotted the network in which case the optimal clustering would be very apparent.
Score: 1