Mar-02-2018, 11:15 AM
code failed to read & extract infos from text file correctly thats all
assume frequency and amplitude is 1st & 2nd column respectively in data.txt. try replace line 18 to 23 with
assume frequency and amplitude is 1st & 2nd column respectively in data.txt. try replace line 18 to 23 with
filz=open(directory,'r') while True: text = filz.readline() if text == '': break text = text.split() frequency.append(text[0]) amplitude.append(text[1]) filz.close()best avoid using python built-in func/keywords( 'file' in this case) as variable name. so i named it filz.
swallow osama bin laden