0
Python3: How can I make a function that evaluates all the three possible numbers between 1and500 that fulfils PythagorasTheorem?
6 Respostas
+ 2
Iterate A from 1to250, B from A to 500 in nested loops. Check if C is integer and less than 501.
+ 1
Gabriel Gonzalez If you want to add all 500 consequent numbers to the list you can easyly do it. One way is:
lst = list(range(1, 501))
There is a fine Python tutorial on SoloLearn:
https://www.sololearn.com/learn/Python/2434/
0
What have you tried so far?
0
Diego Diego I was thinking about using a List but it'll be hard to write all 500 numbers on the list (I don't know if there is a way to include them all in the list without actually typing each one of them), and then, I don't know how can I evaluate all the three number combinations (there are like thousands of them)
0
portpass thanks!