Oct-25-2020, 12:30 PM
I started learning python myself as a hobby and I'm currently stuck with a csv tasks which I'm doing. See, I want to use the data from my excel csv as variables in my code, so I could use it in the body mass index calc.
One line in the csv consist of: Name, Height, Weight. For example: Mike, 190, 75
One line in the csv consist of: Name, Height, Weight. For example: Mike, 190, 75
#the code goes as follows import csv with open('peoples_data.csv', 'r') as csv_file: reader = csv.reader(csv_file) for line in reader: print(line) #this is the formula I want to use the variables in: #BMI = ((1.3 * weight) / height**2.5) * 100000I want to find everyones BMI seperately (and possibly write a new file afterwards, but that I can do already). Any help is welcome cause I've been cracking my brains for 3 hours straight now searching for the way.
