[Tutor] Need help with python keyboard press/navigation commands

2013-03-11 Thread akuma ukpo
This is the problem Implement a function called get_direction which, on a particular character , gives the direction corresponding to that character. The correspondences are as follows:  The character ’w’ corresponds to the direction ’North’  The character ’a’ corresponds to the direction ’West’

Re: [Tutor] Need help with function coding.

2013-03-07 Thread akuma ukpo
function: def gallons_to_cups(quant): """ Takes quantity 'quant' in Gallons and computes and returns the equivalent Cup quantity """ return 16 * quant + 0 what am i doing wrong? On Thu, Mar 7, 2013 at 4:28 PM, akuma ukpo wrote: >

Re: [Tutor] Need help with function coding.

2013-03-07 Thread akuma ukpo
llons to cups in a similar format. On Thu, Mar 7, 2013 at 4:14 PM, Danny Yoo wrote: > On Thu, Mar 7, 2013 at 1:55 PM, akuma ukpo wrote: > > i don't know how to write functions. so i guess that is where i'm stuck. > i > > was following a tutorial on my lab document

[Tutor] Need help with function coding.

2013-03-07 Thread akuma ukpo
I have a python lab to do but for some reason i can't understand. (a) Write a function which converts from gallons to cups2 (b) Now we’d like to be able to convert from cups to milliliters, since metric measurements are easier to convert between. Implement a function which does this. (c) We’d als