d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Need Help Python Programming > Paying Fg
Add Reply New Topic New Poll
Member
Posts: 10,555
Joined: Oct 29 2007
Gold: 0.00
Jan 14 2014 04:57am
I need help with this programming assignment.
Especially the "problem" on third page.
I will pay FG to who would solve this problem for me, or do all the work in this assignment.

This needs to be done ASAP, at the most 11~12hours.

Please let me know!

Page1

Page2

Page3


Please let me know ur timeframe/price

Thanks in advance!
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jan 14 2014 02:33pm
Code
def Load_Data(input_file_name):
try:
with open (input_file_name, "r") as datafile:
data_string=datafile.read()
except IOError:
print "problem finding the file, shutting down"
quit()

data_list = data_string.split("\n")

x_data_raw=[]
y_data_raw=[]
for entry in data_list:
if "x" in entry:
x_data_raw.append(entry)
elif "y" in entry:
y_data_raw.append(entry)

x_data=[]
y_data=[]

try:
while len(x_data_raw) > 0:
for i, entry in enumerate(x_data_raw):
equals_location = entry.find("=")
index = int(entry[1:equals_location])
if index == len(x_data)+1:
x_data.append(entry[equals_location+1:])
x_data_raw.pop(i)

while len(y_data_raw) > 0:
for i, entry in enumerate(y_data_raw):
equals_location = entry.find("=")
index = int(entry[1:equals_location])
if index == len(y_data)+1:
y_data.append(entry[equals_location+1:])
y_data_raw.pop(i)
except:
print "something is wrong with data file formatting, now exiting"
quit()

number_of_points = len(x_data)
if number_of_points != len(y_data):
print "there are not an equal number of x and y values in the data file, now exiting"
quit()
return x_data, y_data, number_of_points


if __name__ == "__main__":
print Load_Data("lagrange-data.txt")


I wrote a quick and dirty function for loading the data into the lists that requires no imports.
Member
Posts: 60,367
Joined: Aug 5 2007
Gold: 20.66
Jan 15 2014 12:45am
Azrad, you happen to use skype or any other messager?
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jan 15 2014 02:52am
Quote (Stolem @ Jan 14 2014 11:45pm)
Azrad, you happen to use skype or any other messager?

send me email at
azrad@mailismagic.com
is disposable email address that I will check for 24 hours.
Go Back To Homework Help Topic List
Add Reply New Topic New Poll