Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ZewedeFormulas
- import math
- BANNER_WIDTH = 40
- def main():
- doDistancePractice("DISTANCE PRACTICE")
- doMidpointPractice("MIDPOINT PRACTICE")
- doRadiusPractice("RADIUS PRACTICE")
- def printBanner(sectionName):
- global BANNER_WIDTH
- print("-" * BANNER_WIDTH)
- print('\t', sectionName)
- print("-" * BANNER_WIDTH)
- def doDistancePractice(sectionName):
- printBanner(sectionName)
- input("Enter x1:", )
- input("Enter y1:", )
- input("Enter x2:", )
- input("Enter y2:", )
- print("Distance =", distance,"\n")
- def doMidpointPractice(section, midpointX, midpointY):
- printBanner(sectionName)
- mX1 = input("Enter x1:", )
- mY1 = input("Enter y1:", )
- mX2 = input("Enter x2:", )
- mY2 = input("Enter y2:", )
- print("Midpoint x =", (format(midpointX, '.4f')),"\n")
- print("Midpoint y =", (format(midpointY, '.4f')),"\n")
- def doRadiusPractice(sectionName, radius):
- printBanner(sectionName)
- input("Enter center x:", )
- input("Enter center y:", )
- input("Enter point x:", )
- input("Enter point y:", )
- print("Radius = ", radius, "\nThat wraps up practice time. See you next time!", sep = '')
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement