Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Midpoint

# Hello World program in Python

print "What is the midpoint between A(5,4) and B(-2,7)"

print "X Midpoint is:", (5.0 + -2.0) / 2.0

print "Y Midpoint is:", (4.0 + 7.0) / 2.0

print " or "

print "Midpoint is:", "(",(5.0 + -2.0) / 2.0,", ", (4.0 + 7.0) / 2.0, ")"

print "Midpoint is:", ((5.0 + -2.0) / 2.0 , (4.0 + 7.0) / 2.0)

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.