Hi,
On Wed, Mar 13, 2013 at 4:07 AM, Soliman, Yasmin wrote:
> I'm using python 2.7, where exactly does the return statment with the
> (return (weight/(height*height))*703 calculation get posted in the function?
>
> def calc_BMI(weight,height):
> if bmi <=18.5:
> return 'underweight'
I'm using python 2.7, where exactly does the return statment with the (return
(weight/(height*height))*703 calculation get posted in the function?
def calc_BMI(weight,height):
if bmi <=18.5:
return 'underweight'
elif bmi >= 18.5 and bmi <=24.9:
return 'normal weight'
On 13/03/2013 02:08, Dave Angel wrote:
On 03/12/2013 09:46 PM, Mark Lawrence wrote:
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to
create a BMI calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(wei
On 03/12/2013 09:46 PM, Mark Lawrence wrote:
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to
create a BMI calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to create a BMI
calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height*height))*703.0
if bmi <=18.5:
print 'un
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to create a BMI
calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height*height))*703.0
if bmi <=18.5:
print 'underweight'
elif bmi >= 18.5 and bmi <=24.9:
On 03/12/2013 11:47 AM, Alan Gauld wrote:
On 12/03/13 14:20, Mike Nickey wrote:
I'm seeing on StackOverflow that 2.7 is the standard for those that have
libraries that haven't been ported to 3.1.2 yet. Does this mean that 2.7
is dead or dying? Is this just a well managed marketing campaign?
L
On 13/03/13 01:20, Mike Nickey wrote:
Hey all,
I'm used to python 2.7 but I'm seeing and hearing a lot about 3.0 and
wanted to ask a few questions.
I'm seeing on StackOverflow that 2.7 is the standard for those that have
libraries that haven't been ported to 3.1.2 yet. Does this mean that 2.7 is
> Also note that I've deliberately left alone a bug in rot1(), to make
> it easier to show a flaw in the original code that you'll want to fix.
Doh. Never mind. _I'm_ the one who introduced that regression. :( Sorry!
Here's a corrected definition for rot1():
#
de
> ##
> ## rot1: char -> char
> ## Rotates a single character.
> def rot1(char):
> if char.isupper() or char.islower():
> test = 'M' if char.isupper() else 'm'
> if char <= test:
> return chr(ord(char) + 13)
> else:
> return chr(ord
On Tue, Mar 12, 2013 at 9:00 AM, RJ Ewing wrote:
> Thank you all for the help. I really appreciated the suggestions. Some of
> the things you pointed out, I originally used, but started changing thing
> when it wasn't working. I got it to work, but if you could let me know if
> there is anything I
>> Finally, from a user experience point of view, it might be more logical to
>> make the keys w,a,s,z North, West,East and South respectively
>
>Most games use WASD, so user experience would be in favour of it
>compared to WASZ. There are a couple of reasons for this:
>
>You live and learn! :-)
> Finally, from a user experience point of view, it might be more logical to
> make the keys w,a,s,z North, West,East and South respectively since its a
> more logical correspondence to the compass points (assuming a standard
> QWERTY keyboard layout).
Most games use WASD, so user experience would
RJ Ewing wrote:
> Thank you all for the help. I really appreciated the suggestions. Some of
> the things you pointed out, I originally used, but started changing thing
> when it wasn't working. I got it to work, but if you could let me know if
> there is anything I should do to make this code more
Thank you all for the help. I really appreciated the suggestions. Some of
the things you pointed out, I originally used, but started changing thing
when it wasn't working. I got it to work, but if you could let me know if
there is anything I should do to make this code more pythonesque that would
b
On 12/03/13 14:20, Mike Nickey wrote:
I'm seeing on StackOverflow that 2.7 is the standard for those that have
libraries that haven't been ported to 3.1.2 yet. Does this mean that 2.7
is dead or dying? Is this just a well managed marketing campaign?
Like any software the latest version will ev
On 12/03/13 14:10, Kevin Khan wrote:
I am currently trying to work on a program that will allow the user to
display their dataset in the form of a colormap and through the use of
sliders, it will also allow the user to adjust the threshold of the
colormap and thus update the colormap accordingly.
Hey all,
I'm used to python 2.7 but I'm seeing and hearing a lot about 3.0 and
wanted to ask a few questions.
I'm seeing on StackOverflow that 2.7 is the standard for those that have
libraries that haven't been ported to 3.1.2 yet. Does this mean that 2.7 is
dead or dying? Is this just a well mana
I am currently trying to work on a program that will allow the user to
display their dataset in the form of a colormap and through the use of
sliders, it will also allow the user to adjust the threshold of the
colormap and thus update the colormap accordingly. The best to describe
this would be th
What can be said after this detailed lesson...Bravo!
On 12/03/2013 11:58, Steven D'Aprano wrote:
On 12/03/13 16:57, RJ Ewing wrote:
I am trying to implement rot 13 and am having troubles. My code is as
follows:
A few comments follow.
def rot_text(self, s):
ls = [i for i in s]
On 12/03/13 16:57, RJ Ewing wrote:
I am trying to implement rot 13 and am having troubles. My code is as
follows:
A few comments follow.
def rot_text(self, s):
ls = [i for i in s]
for i in ls:
if i.isalpha():
if i.isupper():
if i <= 'M'
On 12/03/13 05:57, RJ Ewing wrote:
I am trying to implement rot 13 and am having troubles. My code is as
follows:
There are better ways to do what you are doing but assuming this is a
learning exercise rather than a serious project I'll make some comments:
def rot_text(self, s):
ls = [i
On 12/03/13 03:59, akuma ukpo wrote:
I have tried
def get_direction(self):
"""
whenever a key is pressed the character moves to
the direction corresponding to the key
"""
'North':w
'South': s
'East' : d
'West' : a
What d
23 matches
Mail list logo