There are several big mistake yes.
And that use of global is not good at all.
Dont use global at all it`s ugly.
Test yout code in idle.
This is wrong.
Fraction('x \t\n') Could be.
Fraction = ('x \t\n') But it does not do what you want.
And this will never work.
print(fractions.Fraction(x), 'is fraction from + in +/-.')
print(fractions.Fraction((-b-(b**2-4*a*c)**.5)/(2*a)), ' is fraction from - in +/-.')
And this what to say.
def intro2():
global tocontinue, y, n, N, Y
tocontinue = int(input('Again? (y/n))')
if tocontinue == n:
running = False
else;
running = True
Please test your code in idle, missing")"(if not syntax error)
>>> tocontinue = int(input('Again? (y/n))'))
Again? (y/n))y
Traceback (most recent call last):
File "<pyshell#33>", line 1, in <module>
tocontinue = int(input('Again? (y/n))'))
ValueError: invalid literal for int() with base 10: 'y'
You useint here (input in python 3 return a string)
This is how it should have looked.
>>> tocontinue = input('Again? (y/n ')
Again? (y/n y
>>> tocontinue
'y'
>>>
And this i dont want to comment.
def intro():
global running, intro3, y, Y
while running:
quadratic()
answer()
intro2()
So some more reading is smart.
Most stuff out there is for 2.x,so my advice is to use that to.
No problem to have both 2.x and 3.x installed.
For python 3.x http://diveintopython3.org/
http://en.wikibooks.org/wiki/Non-Programmer's_Tutorial_for_Python_3.0
And a lot good info on this site.
http://www.daniweb.com/forums/thread20774.html