Question: this code is throwing an error - - - - - - - - - - - - - - - - - - -

this code is throwing an error ----------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[15], line 36
34 if __name__=="__main__":
35 filename ="M3_Data40.txt"
--->36 patient_data_list = parse_patient_data(filename)
37 filtered_patient_ids = filter_patient_data(patient_data_list)
39 print("Unique IDs of patients with age less than 56 and diagnosis TRUE:")
Cell In[15], line 20, in parse_patient_data(filename)
18 for line in file:
19 values = line.strip().split(',')
--->20 diagnosis, age, gender, chest_pain_type, resting_blood_pressure, serum_cholesterol = values
21 patient = PatientData(diagnosis, int(age), gender, chest_pain_type, int(resting_blood_pressure), int(serum_cholesterol))
22 patient_data_list.append(patient)
ValueError: not enough values to unpack (expected 6, got 1)
 this code is throwing an error ---------------------------------------------------------------------------- ValueError Traceback (most recent

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!