"Vickram" <vick1...@intnet.mu> wrote
I need help in translating a C++ code into python.. Can you help please? The python result is wrong because I may have misread the C++ code
The C++ code is really just C code, there is virtualy no C++ stuff there. But that aside your translation is pretty faithful (too faithful with all
those float() conversions). When you say it is "wrong" what exactly do you mean? You get different values as output? By how much? It looks like you need to do a detailed step by step walk through of the code and see if you have missed an operator or polarity or maybe have an off-by-one error in a loop. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor