Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54634
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Help with python functions? |
| Date | 2013-09-23 09:11 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-51492A.09112523092013@news.panix.com> (permalink) |
| References | <e484b709-1287-4e6a-bc43-05f02a608579@googlegroups.com> |
In article <e484b709-1287-4e6a-bc43-05f02a608579@googlegroups.com>, kjakupak@gmail.com wrote: > 1.a. Write a function temp(T, from_unit, to_unit) where from_unit and to_unit > are temperature units, either 'F' (or 'f') for fahrenheit, or 'C' (or 'c') > for celsius, or 'K' (or 'k') for kelvin; and T is a temperature number for > the unit from_unit. The function should return the temperature number in the > unit to to_unit; no unit is returned. [input(...) and print(...) are not > allowed] We don't do people's homework for them. But, I'll give you a hint. Forget about doing this in python. Write down the steps you would take to do this problem with pencil and paper. That really is how you begin any programming problem; understanding the algorithm you need to execute. The rest is, as Mozart said, just scribbling.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help with python functions? kjakupak@gmail.com - 2013-09-23 05:57 -0700
Re: Help with python functions? Roy Smith <roy@panix.com> - 2013-09-23 09:11 -0400
Re: Help with python functions? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-23 13:56 +0000
Re: Help with python functions? kjakupak@gmail.com - 2013-09-23 15:32 -0700
Re: Help with python functions? Terry Reedy <tjreedy@udel.edu> - 2013-09-23 18:48 -0400
Re: Help with python functions? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-24 03:08 +0000
Re: Help with python functions? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-24 03:17 +0000
Re: Help with python functions? giacomo boffi <pecore@pascolo.net> - 2013-09-24 18:53 +0200
Re: Help with python functions? MRAB <python@mrabarnett.plus.com> - 2013-09-24 18:18 +0100
Re: Help with python functions? kjakupak@gmail.com - 2013-09-23 15:55 -0700
Re: Help with python functions? Dave Angel <davea@davea.name> - 2013-09-24 00:07 +0000
Re: Help with python functions? kjakupak@gmail.com - 2013-09-23 18:23 -0700
Re: Help with python functions? Dave Angel <davea@davea.name> - 2013-09-24 03:52 +0000
Re: Help with python functions? Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-24 02:12 +0000
Re: Help with python functions? kjakupak@gmail.com - 2013-09-23 19:40 -0700
Re: Help with python functions? Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-24 14:51 +0000
Re: Help with python functions? Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-24 19:42 +0000
Re: Help with python functions? kjakupak@gmail.com - 2013-10-01 10:53 -0700
Re: Help with python functions? random832@fastmail.us - 2013-10-01 15:02 -0400
Re: Help with python functions? Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-01 21:45 +0000
Re: Help with python functions? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-10-01 19:19 -0400
Re: Help with python functions? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-24 03:15 +0000
Re: Help with python functions? Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-24 15:02 +0000
csiph-web