Re: [Tutor] Help needed with Python programming

2014-04-22 Thread Danny Yoo
Unfortunately, we can't give too much specific help on your particular problem because it's homework. You should use the knowledge you learned in your introductory programming class about designing programs. In particular, give a name to the function or functions your are designing. Be rigorous

Re: [Tutor] Help needed with Python programming

2014-04-22 Thread Mark Lawrence
On 22/04/2014 12:41, Steven D'Aprano wrote: On Mon, Apr 21, 2014 at 06:16:20PM -0700, Suhana Vidyarthi wrote: [...] # on Windows either of these will be okay filename = "C:/path/to/file.txt" filename = "C:\\path\\to\\file.txt" Or a raw string r'C:\path\to\file.txt' -- My fellow Pythonis

Re: [Tutor] Help needed with Python programming

2014-04-22 Thread Steven D'Aprano
On Mon, Apr 21, 2014 at 06:16:20PM -0700, Suhana Vidyarthi wrote: [...] > I have a python code that shows a set of shortest paths between nodes A and > B. Now I have to select the least risky path among them. To do that I have > to consider the risk values of each link. I know how to calculate the

Re: [Tutor] Help needed with Python programming

2014-04-22 Thread Alan Gauld
On 22/04/14 02:16, Suhana Vidyarthi wrote: I have a python code that shows a set of shortest paths between nodes A and B. It would help if you showed us this code. Otherwise we are just making wild guesses about how you are modelling this. Also knowing which Python version you are using would

[Tutor] Help needed with Python programming

2014-04-22 Thread Suhana Vidyarthi
My knowledge of coding is fairly limited and I am having a hard time writing a Python code which might be pretty simple for you :-) Here is what I am doing and I need help with: I have a python code that shows a set of shortest paths between nodes A and B. Now I have to select the least risky pat