Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread R. Alan Monroe
> a) How's the best way to make it so I can have a user type in a list of > symptoms and then have the computer tell the user the possible diseases that > share those symptoms? Good question. The first decent idea that came to mind was searching through a cartesian join of all diseases & symptom

Re: [Tutor] [OT] Re: Floating Point Craziness

2011-06-13 Thread Andre' Walker-Loud
On Jun 13, 2011, at 1:44 PM, Emile van Sebille wrote: > On 6/12/2011 1:55 PM Andre' Walker-Loud said... >> Hi Alan, >> * Or you just get used to the fact that some numbers are not exact in floating point. >>> >>> This got me thinking. How many decimal places do you need to >>> accurat

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Jim Richardson
On Mon, Jun 13, 2011 at 3:35 PM, Fred G wrote: > Thanks guys for all the feedback. > re Jim's comments: I completely agree that the difference b/t "slight" fever > and "returning" fever, etc will pose some problems.  My hunch is that > initially I'll just do something like make "fever" be the only

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Alan Gauld
"Fred G" wrote re Steve's comments: hmm, sounds like I really should take an AI class. This problem is just really exciting and driving me, and I'm glad you pointed out that this will probably take a lot more time than I had predicted. I assume you know that there are several commerial pac

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Steven D'Aprano
Kĩnũthia Mũchane wrote: On 06/12/2011 08:13 PM, Steven D'Aprano wrote: Unfortunately, many common fractions cannot be written exactly in binary. You're probably familiar with the fact that fractions like 1/3 cannot be written exactly in decimal: 1/3 = 0.... goes on forever Does it?

Re: [Tutor] Excited about python

2011-06-13 Thread Siim Märtmaa
2011/6/10 Kaustubh Pratap chand : > Can you recommend a book for a person like me which comes with a C > background and the book covers all essential algoithmic methods and > examples? You, might find "Data Structures and Algorithms with Object-Oriented Design Patterns in Python" by Bruno R. Preis

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Fred G
Thanks guys for all the feedback. re Jim's comments: I completely agree that the difference b/t "slight" fever and "returning" fever, etc will pose some problems. My hunch is that initially I'll just do something like make "fever" be the only one for now w/ the obvious caveat that a few more dise

Re: [Tutor] Lists

2011-06-13 Thread Kĩnũthia Mũchane
On 06/13/2011 12:17 AM, R. Berman wrote: Having followed this absurd thread from its beginning hopefully to this, the end of it. Everyone replying to your diatribe has been incredibly polite to you. One of the moderators tried to explain the obvious to you. This is a Python group. Python is to

Re: [Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread Alan Gauld
"amt" <0101...@gmail.com> wrote in message I am honestly confused. I have read the exercise and found three lines that could use the floating point(2,3 and line 5). I can understand why at line 5 I use floating point. 6,75 is more precise than saying 7. Exactly, no problem with line 5 (exc

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Kĩnũthia Mũchane
On 06/12/2011 08:13 PM, Steven D'Aprano wrote: Ryan Strunk wrote: Hi everyone, I'm designing a timeline. When the user presses the right arrow, 0.1 is added to the current position. The user can add events to the timeline, and can later scroll back across those events to see what they are. But

Re: [Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread Walter Prins
Hi, On 13 June 2011 20:28, amt <0101...@gmail.com> wrote: > >> Can you explain your reasoning? Why do you think line 3 needs >> to be changed? Why line 5? > > > Well the exercise says: "Rewrite ex3.py to use floating point numbers so > it’s more accurate (hint: 20.0 is floating point)." > > I am

Re: [Tutor] [OT] Re: Floating Point Craziness

2011-06-13 Thread Emile van Sebille
On 6/12/2011 1:55 PM Andre' Walker-Loud said... Hi Alan, * Or you just get used to the fact that some numbers are not exact in floating point. This got me thinking. How many decimal places do you need to accurately, say, aim a laser somewhere in a 180 degree arc accurately enough to hit a dim

Re: [Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread amt
> > > Can you explain your reasoning? Why do you think line 3 needs > to be changed? Why line 5? Well the exercise says: "Rewrite ex3.py to use floating point numbers so it’s more accurate (hint: 20.0 is floating point)." I am honestly confused. I have read the exercise and found three lines tha

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread عمـ نوفل ـاد
On Mon, Jun 13, 2011 at 5:22 PM, Fred G wrote: > Hello-- > > I'm a pre-med student interested in decision-making as applied to medical > decisions. I am trying to build a medical decision-making algorithm and am > pretty stuck on a few things. > > I've built a file that contains a list of many d

Re: [Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread amt
Hello, my version is Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39). The book only talks about Python 2.x. So, how do I solve the exercise? 3. print "Roosters", 100 - 25 * 3 % 4.00 5. print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4.00 + 6 Is this correct? I'm a bit confused at line 5 because python return

Re: [Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread Alan Gauld
"amt" <0101...@gmail.com> wrote 1 print "I will now count my chickens:" 2 print "Hens", 25 + 30 /6 3 print "Roosters", 100 - 25 * 3 % 4 #Output is 97 4 print "Now I will count the eggs:" 5 print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6 #Output needs to be 6,83 but Python give me 7 6 print "Is it true th

Re: [Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread Válas Péter
2011/6/13 amt <0101...@gmail.com> > I came up with: > print "Roosters", 100 - float(25) * 3 % 4 > > This is for line 3 so it is more precised. Is it correct what I did? I don't think so. All the operations in this line are for integers. % means the remainder of the division, so according to the

[Tutor] Floating point exercise 3 from Learn python the hard way

2011-06-13 Thread amt
Hello, I am a python beginner currently learning from "Learn python the hard way". I'm stuck at exercise 3 and I would like if it's possible to get some help so I can move on. Here is the source code: 1 print "I will now count my chickens:" 2 print "Hens", 25 + 30 /6 3 print "Roosters", 100 - 25 *

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Steven D'Aprano
Fred G wrote: Hello-- I'm a pre-med student interested in decision-making as applied to medical decisions. I am trying to build a medical decision-making algorithm and am pretty stuck on a few things. Essentially what you want is to build an expert system. I don't want to discourage you, bu

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread Jim Richardson
On Mon, Jun 13, 2011 at 7:22 AM, Fred G wrote: > Hello-- > I'm a pre-med student interested in decision-making as applied to medical > decisions.  I am trying to build a medical decision-making algorithm and am > pretty stuck on a few things. > I've built a file that contains a list of many diseas

Re: [Tutor] Medical Decision-Making Question

2011-06-13 Thread James Reynolds
I would start by getting a lot of the parameters you need in a database such as SQLite (comes with python). So for example, you would have a disease with known symptoms. You could structure your tables with diseases symptoms So, say the disease is a cold in the table you will have a row for cold

[Tutor] Medical Decision-Making Question

2011-06-13 Thread Fred G
Hello-- I'm a pre-med student interested in decision-making as applied to medical decisions. I am trying to build a medical decision-making algorithm and am pretty stuck on a few things. I've built a file that contains a list of many diseases and their associated symptoms. For example, here are

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Válas Péter
2011/6/13 Steven D'Aprano > Okay fine, so "1024" stored as a number only requires 10 bits (binary >>> digits) to store, >>> >> >> Actually, 11. :-) >> > > > I see your smiley, but actually more than that. OK, this was the math, I just told that 10 bits were not enough for 2^10. > > And if you'

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Steven D'Aprano
Válas Péter wrote: 2011/6/12 Brett Ritter Okay fine, so "1024" stored as a number only requires 10 bits (binary digits) to store, Actually, 11. :-) I see your smiley, but actually more than that. Due to the way computers are designed, numbers are stored in fixed bundles of 8 bits making a

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Steven D'Aprano
Nathan wrote: who can tell me how to unsubscribe the message. Look at the bottom of every single message to the mailing list, and you will see this: Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor -- Steven _

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Válas Péter
2011/6/12 Brett Ritter > > Okay fine, so "1024" stored as a number only requires 10 bits (binary > digits) to store, Actually, 11. :-) Another point that was still not emphasized enough: that's why Python's documentation at http://docs.python.org/dev/library/stdtypes.html#mapping-types-dict say

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Alan Gauld
"Nathan" wrote Every message tells you: who can tell me how to unsubscribe the message. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor --

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Nathan
who can tell me how to unsubscribe the message. At 2011-06-13 01:13:05,"Steven DAprano" wrote: >Ryan Strunk wrote: >> Hi everyone, >> I'm designing a timeline. When the user presses the right arrow, 0.1 is >> added to the current position. The user can add events to the timeline, and >> can l

Re: [Tutor] python-gobject for debian4

2011-06-13 Thread Steven D'Aprano
Ganesh Kumar wrote: Hi Guys. I want python-gobject package for debian4 (etch). But unfortunately removed for debian4 depository . This is not a Python problem. It is especially not a problem about learning Python. You should ask this at either a Debian forum or on the python-gobject mailin

Re: [Tutor] step value

2011-06-13 Thread Steven D'Aprano
Vincent Balmori wrote: I am stuck on a question for Absolute Beginner's. I googled this and there have been others who have not understood the question and I am also not clear on the question he is asking. This function is a part of a tic tac toe program."Improve the function ask_number() so th

[Tutor] python-gobject for debian4

2011-06-13 Thread Ganesh Kumar
Hi Guys. I want python-gobject package for debian4 (etch). But unfortunately removed for debian4 depository . How to install python-gobject package in debian4.. My Idea is download debian5 repository python-gobject.deb file Install in debian4. I have try is working fine. but the thing is rebo

[Tutor] step value

2011-06-13 Thread Vincent Balmori
I am stuck on a question for Absolute Beginner's. I googled this and there have been others who have not understood the question and I am also not clear on the question he is asking. This function is a part of a tic tac toe program."Improve the function ask_number() so that the function can be