Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Special Pythagorean triplet

# PROJECT EULER #9


for a in range(1, 500):
    for b in range(1, 500):
        for c in range(1, 500):
            if a ** 2 + b ** 2 == c ** 2 and a + b + c == 1000:
                print(a)
                print(b)
                print(c)
                d = a * b * c
                print(f"Product of {a}, {b} and {c} is: {d}")
Comment

PREVIOUS NEXT
Code Example
Python :: Maximum number of guests on cruise at an instance tcs 
Python :: how to check if a dictionary is empty in python 
Python :: python tri alphabetique 
Python :: pool does not print process id 
Python :: Multiple sub in single regex. 
Python :: django graphene without model 
Python :: python filter dictionary 
Python :: qcut and cut function in python stack overflow 
Python :: pandas parameters read 
Python :: actual python iterators 
Python :: filter numbers with bounds filter_bounds python 
Python :: check if a string is a palindrome python 
Python :: context manager requests python 
Python :: comprehensive python cheat sheet 
Python :: qaction hide show python 
Python :: modbusfc03 python 
Python :: convert python code to c online free 
Python :: xpath h4 contains text 
Python :: upper python 
Python :: df add column from dict 
Python :: python combine if statements 
Python :: pygame get rect 
Python :: python endless loop 
Python :: pandas 
Python :: bokeh bar chart 
Python :: how to add element to list value in a dict python 
Python :: gfg placement 
Python :: python string: .replace() 
Python :: python run system commands 
Python :: np minimum of array 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =