[Tutor] Design questions?

Alan Gauld alan.gauld at freenet.co.uk
Thu Jan 5 00:59:08 CET 2006

Hi Richard,

The first thiong is forget the GUI for now it will be much easier to get
a command line version working then add a GUI (or web page) later.

> (Input Clients name) input text box
> age= spinner
> Male or Female= radio buttons
> Tobacco User yes or no
> Health Here I was thinking about 4-5 options
> Diabetic yes or no?
> Amount of Coverage input text box

Just make all of these raw_input lines initially, you can do some
validation for good data after you've captured it.

> So those would be the input parameters, Here is how it would work (at 
> least in my limited knowledge) The program is going to look at age first 
> then Male or female then, Tobacco, and health after it accumulates all the 
> information then it will have 5- 6 companies to find the rates from.( This 
> will be based on the health too, because as an example if health= poor 
> then there is only one company to look at. This is true if the person is 
> diabetic, only one company.

Try doing it with one company fdirst, then once you get the right rate
its easy enough to adapt it to repeat the check for seveal companies.

> I can use a prefered rate too but then I would have to put in a weight 
> chart. (sigh)

I'd leave this bit till you get the basic one working with several 

> So when the program looks at these companies. Let me back up a minute 
> here. To calculate rates is as follows
> Rate= (Unit cost X amount) + policy fee X modal factor (modal factor is 
> different for monthly,quarterly and semi annual.

Get the calcuilations going first, then worry about repeating them per
company and storiung results....

> So then program looks to find the best rate and return the value into 3 
> box.......Monthly Quarterly and Semi

Just get it to print the result to screen initially.

> Also now I bet your saying this guy is getting picky, I want to be able to 
> write the quote to a file for future use.

Yep, you can do that too.

> So I have allot of the rates in excel now, do I need to build tables with 
> each company?

You can actually read them from Excel but for now I'd save the Excel
data in a CSV file and use the csv module to read them in. But first get
it working witrh static data from one company.

> I know this is a big project so I was told by someone. But I am just look 
> for a starting point and then I will go from there.

Its actually a very good project because its possible to break it into a
lot of small bite size bits.

Have fun, ask questions as you go.

Alan G
Author of the learn to program web tutor

More information about the Tutor mailing list