Solving systems of Linear equations using Iteration:
You are required to write a Python program which will solve system of linear equations with 3 unknowns
(to be entered by the user).
Your program should display a menu which will allow the user to choose whether he wants to (1)
coefficients (2) check whether the linear system can be solved using iteration (3) calculate and display the
required results using Gauss-Seidel (4) calculate and display the required results using Gauss-Jacobi
Note that in all cases, the outcomes of the iterations should be displayed. Also if the values of the
unknowns are not converging, your program should stop at the 15th iteration.

Can someone guide me on this please?
I got some really good notes from this forum before and need ur help again.

Thank you in advance.Cheers

i also have this problem pheenix45....if you find out how to solve it...plz tell me..

Come on people, you need to do your homework yourself or you will not learn anything! Salem's advice is your best start.

Can we insert menu in python without adding any new module? plz help... i need to submit a work and i think my lecturer don't have wxPython, TKinter, PythonWin etc...thanx

Can do something like

a = int(raw_input('Enter first unknown' ))
b = int(raw_input('Enter second unknown' ))
c = int(raw_input('Enter third unknown' ))

well i know about Gauss Seidel and Gauss Jacobi but the problem is i've learnt python for about 2 weeks only and im having to work a menu.

I wanted to know if i could get some help to start the menu.I'll do the maths part working with the iterations etc as i learnt about loops today :D

Please help me with the menu its really difficult to get this.

Cheers

So you're saying that the topic is basically wrong and it should have been "help to display a menu", and all that stuff about Gauss and coefficients was just a red herring to throw everyone off to thinking about a completely different issue.

Have you tried Chewie-DK's answer?

Try this :)

menu = """You can
 (1) Enter the coefficients
 (2) Check solvability
 (3) Solve the system using the Gauss-Seidel method
 (4) Solve the system using the Gauss-Jacobi method
"""

while True:
  choice = raw_input(menu)
  print "you chose", choice
  if not choice in "1234":
      break

I wanted to know if i could get some help to start the menu.I'll do the maths part working with the iterations etc as i learnt about loops today

Post the code for the math and we will help with the menu. Of course it's not going to happen. The strategy here is to keep asking more questions until little by little the entire program is coded by someone else, or rather by many others. Please don't give positive reinforcement to lazy manipulators. It only increases their appetite.

Obviously, no one has tried Google. But that takes initiative and some work.

This article has been dead for over six months. Start a new discussion instead.