Its not running

``````import math
import os

cls = os.system("cls")
title = os.system("title Pythagorean Theorum Solver")

def MainLoop():
cls
print "Enter 3 coordinate plane points (x - y) format"
print ""

firstPair = input("--> ")
SecondPair = input("--> ")

MathPart()

def MathPart():

'''structure of the formula:

squareRoot of --> (x-y)^2 + (x-y)^2

'''

g = (FirstPair ** 2) + (SecondPair ** 2)

raw_input()
MainLoop()``````

Ouch!!!!!!!
A couple of hints ...

variable, function and class names are case sensitive in Python
firstPair and FirstPair are not the same

don't use capitalized names for functions, those are traditionally used for class names

not quite sure what your hangup is with clearing the screen, those things are OS specific

You need to read up on functions, try this here:
http://www.swaroopch.com/notes/Python_en:Functions

I don't understand why someone modded the OP down. He clearly showed effort in his homework, and has a legitimate newby question.

I redid my code and it worked. I did not understand how to do anything you suggest vegaseat and the link you gave did not help much :( im kind of lost with it i guess.

``````import math
import os

while 1:

cls = os.system("cls")
title = os.system("title Pythagorean Theorum Solver")

print "Enter 2 values in (x - y) format"
print ""
FirstPair = input("--> ")
SecondPair = input("--> ")

'''structure of the formula:

squareRoot of --> (x-y)^2 + (x-y)^2

'''

g = (FirstPair ** 2) + (SecondPair ** 2)

raw_input()``````

Well I managed to make my code run-able by elminating the use of functions, simply because I don't understand how to make variables work universally throughout functions, and some other stuff...

but yeah, I like to use things like cls and mode because im used-to another very simple, less powerful language that used those types of things.

I don't know anyone who uses linux nor do i associate with many mac users so I don't care much about OS specific commands.

I know you gave me a link vegas, but i didn't get it.

Here's my new working code:

``````import math
import os

while 1:

cls = os.system("cls")
title = os.system("title Pythagorean Theorum Solver")
mode = os.system("mode con cols=35 lines=5")

mode

print "Enter 2 values in (x - y) format"
print ""
FirstPair = input("--> ")
SecondPair = input("--> ")

'''structure of the formula:

squareRoot of --> (x-y)^2 + (x-y)^2

'''

g = (FirstPair ** 2) + (SecondPair ** 2)

print ""
raw_input()``````

I redid my code and it worked. I did not understand how to do anything you suggest vegaseat and the link you gave did not help much :( im kind of lost with it i guess.

``````import math
import os

while 1:

cls = os.system("cls")
title = os.system("title Pythagorean Theorum Solver")

print "Enter 2 values in (x - y) format"
print ""
FirstPair = input("--> ")
SecondPair = input("--> ")

'''structure of the formula:

squareRoot of --> (x-y)^2 + (x-y)^2

'''

g = (FirstPair ** 2) + (SecondPair ** 2)