Posts by José Fonseca • 11 points
2 posts
-
1
votes1
answer1218
viewsA: Find out if a point is within a circle on a Cartesian plane
#!/usr/bin/env python # -*- coding: UTF-8 -*- def calcula_pontos(): def closure_dist2_tiro_centro(): input = raw_input().split() return (int(input[0]) ** 2) + (int(input[0]) ** 2) qtd_circulos,…
-
0
votes1
answer63
viewsA: Increment URL via concatenation and using urllib2.urlop
I understand your "question" as "how can I generalize the code below?" The following version simplifies the execution of your code using str.format(), a method of str objects that allows you to fill…