You essentially need to replicate the barchart in examples/Figure_1.png
What specifically are you struggling with?
Are you just not understanding this bit?
Add an ‘overweight’ column to the data. To determine if a person is overweight, first calculate their BMI by dividing their weight in kilograms by the square of their height in meters. If that value is > 25 then the person is overweight. Use the value 0 for NOT overweight and the value 1 for overweight.
Well, you are almost doing everything you need here:
a = (medfile["height"]**2)
Now, where is the weight property?
You have correctly accessed the height property
You have correctly performed a mathematical operation on it
How do you think you can divide weight by height, now?
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
I do not intend to be mean here: This kind of data/variable accessing/creating is very basic to every programming language, and looks almost identical in most programming languages. If this is new to you, I would recommend you go back over the Python for Everybody section which should cover this.
Hope this helps
Also, please read what I mentioned above about putting code in this forum. It is very important to correctly format Python code, because indentation is important.