- **Python**
(*http://www.velocityreviews.com/forums/f43-python.html*)

- - **Need help deriving a convertion function on python**
(*http://www.velocityreviews.com/forums/t958475-need-help-deriving-a-convertion-function-on-python.html*)

Need help deriving a convertion function on pythonGood day,
I have a computer programming assignment. I am completely lost and i need some help. These are the questions that are confusing me (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 also like to be able to easily convert gallons into milliliters,so implement a function which does this |

Re: Need help deriving a convertion function on pythonOn Thursday, March 7, 2013 2:25:42 PM UTC-6, johnn...@gmail.com wrote:
> I have a computer programming assignment. I am completely > lost and i need some help. These are the questions that > are confusing me > > (a) Write a function which converts from gallons to cups2 How can we help you if we have no idea of what level of programming experience you have attained. Can you write functions? Can you declare variables? What about mathematics? If you can already do all these things then make anattempt to accomplish problem "(a)" and then ask us a specific question when you run into trouble. > (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 also like to be able to easily convert gallons > into milliliters, so implement a function which does this In due time grasshopper. First make an attempt to solve problem "(a)". Chris gave some great advice however i would like to insert a "step 0" into his"advice list" (this is python after all ;-). * STEP 0: Learn how to convert from gallons to cups using a pencil and paper only. * STEP 1: Read docs and learn about functions (if applicable). * STEP 2: Try to write a python function that will take one parameter (representing the number of gallons) and then perform the mathematical equations required to deduce the number of cups in a gallon, THEN return the result. |

Re: Need help deriving a convertion function on pythonOn 03/07/2013 03:40 PM, Chris Angelico wrote:
> On Fri, Mar 8, 2013 at 7:25 AM, <johnnyukpo@gmail.com> wrote: >> Good day, >> >> I have a computer programming assignment. I am completely lost and i need some help. >> >> These are the questions that are confusing me <SNIP> > > By the way, you may > find the python-tutor list more suitable, if you feel your questions > are particularly basic: > http://mail.python.org/mailman/listinfo/tutor > Actually his brother 'akuma upko' (sharing the same account) posted the same question on Python-tutor 2 minutes before johnny posted it here. -- DaveA |

All times are GMT. The time now is 11:03 PM. |

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.

SEO by vBSEO ©2010, Crawlability, Inc.