Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Need help deriving a convertion function on python

Reply
Thread Tools

Need help deriving a convertion function on python

 
 
johnnyukpo@gmail.com
Guest
Posts: n/a
 
      03-07-2013
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
(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
 
Reply With Quote
 
 
 
 
Rick Johnson
Guest
Posts: n/a
 
      03-07-2013
On 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.
 
Reply With Quote
 
 
 
 
Dave Angel
Guest
Posts: n/a
 
      03-08-2013
On 03/07/2013 03:40 PM, Chris Angelico wrote:
> On Fri, Mar 8, 2013 at 7:25 AM, <> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
On-the-fly convertion of function modules into include modules Trans Ruby 0 07-29-2005 02:08 PM
type convertion of an unconstrained output in a port map ygrugni@hotmail.com VHDL 8 02-10-2005 06:53 PM
Convertion php to asp.net : PB lecture fichier .ini isore ASP .Net 0 07-01-2004 05:52 PM
need help deriving from the std::list class JustSomeGuy C++ 8 06-10-2004 11:14 AM
BMP to GIF convertion Hiranya Samarasekera Java 3 08-27-2003 03:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57