IconicDrei
11-16-2012, 09:48 PM
Hi Guys,
I'm currently in the process of scripting a BMI Calculator in Python and Maya for a uni project. I have decided to create a GUI for it and am now at the stage where I am trying to search for code that will help me apply two user inputs (height & weight), apply a calculation and print a result.
http://andreishah.co.uk/Host/bmi_screen.jpg
Oddly enough, I've scripted this to work fine without a GUI, I have code like this:
height = float(raw_input("Message Appears Here"
weight = float(raw_input("Message Appears Here")
if bmi > (number) and bmi < (number):
print "(Message Here")
and so on..
This just doesn't work with my new script that I've written, the GUI code seems to be responsible for this I think, (in my very non-python experienced mind).
If you have any tips, hints, help, whatever, I'd be greatly appreciative. Rather annoyingly I know it's not the most complicated piece of code, but one that's taking me ages to figure out. Just a point in the right direction would be good.
Thanks :)
I'm currently in the process of scripting a BMI Calculator in Python and Maya for a uni project. I have decided to create a GUI for it and am now at the stage where I am trying to search for code that will help me apply two user inputs (height & weight), apply a calculation and print a result.
http://andreishah.co.uk/Host/bmi_screen.jpg
Oddly enough, I've scripted this to work fine without a GUI, I have code like this:
height = float(raw_input("Message Appears Here"
weight = float(raw_input("Message Appears Here")
if bmi > (number) and bmi < (number):
print "(Message Here")
and so on..
This just doesn't work with my new script that I've written, the GUI code seems to be responsible for this I think, (in my very non-python experienced mind).
If you have any tips, hints, help, whatever, I'd be greatly appreciative. Rather annoyingly I know it's not the most complicated piece of code, but one that's taking me ages to figure out. Just a point in the right direction would be good.
Thanks :)
