Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
coding help -python
#2
First, need to instantiate the class. In line 102, add
bmi = BMI()
then in 103 make it bmi.main(), 105 should have bmi.name instead of just name

You call calc_bmi() in 100 but do nothing with the return value. Either store bmi within the object or save it.
You then call bmi_analysis in 101 without an argument, but in the function definition it is supposed to be sent "bmi". You could instead combine 100 and 101 with
self.bmi_analysis(self.calc_bmi())
Fix those and it should work, though I have no idea how many stones I am.
Reply


Messages In This Thread
coding help -python - by rs08 - Jan-28-2020, 01:18 PM
RE: coding help -python - by jefsummers - Jan-28-2020, 02:17 PM
RE: coding help -python - by rs08 - Jan-29-2020, 09:35 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020