DAGDA SEARCH | Back to results | Support

Pythagorean Theorem - Python Wiki

Source: https://wiki.python.org/python/archive/PythagoreanTheorem.html

  1. Python Wiki /
  2. Python Wiki /
  3. Archive /
  4. Pythagorean Theorem
View as Markdown

Pythagorean TheoremΒΆ

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

from math import hypot

print "Pythagorean Theorem - Version 1.0"

print

print "What is the value of x?"

x = float(raw_input())

print

print "What is the value of y?"

y = float(raw_input())

print

print "The value of z is":

print hypot(x, y)

print

print "Press Enter to quit."

raw_input()
PreviousPyro Next Python