tutor-requ...@python.org wrote:
>Send Tutor mailing list submissions to > tutor@python.org > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/tutor >or, via email, send a message with subject or body 'help' to > tutor-requ...@python.org > >You can reach the person managing the list at > tutor-ow...@python.org > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Tutor digest..." > > >Today's Topics: > > 1. Re: Connecting my users (Timo) > 2. Re: data question (Alan Gauld) > 3. Re: data question (Roelof Wobben) > 4. Re: data question (Roelof Wobben) > 5. Re: data question (Roelof Wobben) > 6. Re: data question (Robert Berman) > 7. Re: Coin Toss Problems (bob gailer) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Sat, 02 Oct 2010 12:06:14 +0200 >From: Timo <timomli...@gmail.com> >To: Nitin Pawar <nitinpawar...@gmail.com> >Cc: tutor@python.org >Subject: Re: [Tutor] Connecting my users >Message-ID: <4ca70416.2050...@gmail.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >On 01-10-10 11:25, Nitin Pawar wrote: >> have a look at this >> >> http://bytes.com/topic/python/answers/826973-peer-peer-chat-program > >Thanks, but that still uses a server. And even one that I can't control! >If it has to be with server interaction, than as little as possible is >preferred and option to put it on my own. > >Cheers, >Timo > >> >> On Fri, Oct 1, 2010 at 2:49 PM, Timo <timomli...@gmail.com >> <mailto:timomli...@gmail.com>> wrote: >> >> Hello, >> >> I have the following idea, but no clue how to implement this. >> I want my users to be able to connect to other users (with the >> same program) and chat with them and exchange files. Ideally >> without server interaction. Now I heard about peer-to-peer and >> bittorrent protocol etc. But don't know where to start or that I'm >> even at the right path. >> So if anyone can point me into the right direction of a framework >> or protocol I should use for this, it would be appreciated. >> >> Cheers, >> Timo >> >> _______________________________________________ >> Tutor maillist - Tutor@python.org <mailto:Tutor@python.org> >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor >> >> >> >> >> -- >> Nitin Pawar >> > > > >------------------------------ > >Message: 2 >Date: Sat, 2 Oct 2010 14:10:25 +0100 >From: "Alan Gauld" <alan.ga...@btinternet.com> >To: tutor@python.org >Subject: Re: [Tutor] data question >Message-ID: <i87b0a$s0...@dough.gmane.org> >Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > >"Roelof Wobben" <rwob...@hotmail.com> wrote > >> As a test I would write a programm where a user can input game-data >> like home-team, away-team, home-score, away-score) and makes a >> ranking of it. > >> In which datatype can I put this data in. >> >> I thought myself of a dictonary of tuples. > >A dictionary would be good for the basic data but I assume there >are more than one of these data items? If so what do they represent? >How would they be used? > >We need a bit more information, even some sample datya might help. > >It could be a list of dictionaries or even a dictionary of >dictionaries. > >Alan G. > > > > >------------------------------ > >Message: 3 >Date: Sat, 2 Oct 2010 13:10:03 +0000 >From: Roelof Wobben <rwob...@hotmail.com> >To: <tutor@python.org> >Subject: Re: [Tutor] data question >Message-ID: <snt118-w630e6e394ca68b65d3010bae...@phx.gbl> >Content-Type: text/plain; charset="iso-8859-1" > > > > >---------------------------------------- >> From: rwob...@hotmail.com >> To: berma...@cfl.rr.com >> Subject: RE: [Tutor] data question >> Date: Sat, 2 Oct 2010 13:09:23 +0000 >> >> >> >> >> ---------------------------------------- >>> From: berma...@cfl.rr.com >>> To: rwob...@hotmail.com; tutor@python.org >>> Subject: RE: [Tutor] data question >>> Date: Sat, 2 Oct 2010 09:02:41 -0400 >>> >>> >>> >>>> -----Original Message----- >>>> From: tutor-bounces+bermanrl=cfl.rr....@python.org [mailto:tutor- >>>> bounces+bermanrl=cfl.rr....@python.org] On Behalf Of Roelof Wobben >>>> Sent: Saturday, October 02, 2010 4:35 AM >>>> To: tutor@python.org >>>> Subject: [Tutor] data question >>>> >>>> >>>> >>>> Hello, >>> >>>> Now my question is : >>>> >>>> In which datatype can I put this data in. >>>> >>> Perhaps a simple SQLlite database? >>> http://zetcode.com/databases/sqlitetutorial/ >>> >>> Hope this helps, >>> >>> Robert >>> >>> >>> >>>> Regards, >>>> >>>> Roelof >>>> >>>> _______________________________________________ >>>> Tutor maillist - Tutor@python.org >>>> To unsubscribe or change subscription options: >>>> http://mail.python.org/mailman/listinfo/tutor >>> > >Oke, > >Oke, there I can save the input data. >But I have also need a data model for team, played_games, game_points, >made_points and againts_points. >So I think it cannot be done without using a class for games and one for >ranking. >And figuring out how I can store the game-data in a text or database file. > >Roelof > >------------------------------ > >Message: 4 >Date: Sat, 2 Oct 2010 13:15:33 +0000 >From: Roelof Wobben <rwob...@hotmail.com> >To: <alan.ga...@btinternet.com>, <tutor@python.org> >Subject: Re: [Tutor] data question >Message-ID: <snt118-w195cf690c7e6969f5fc4eeae...@phx.gbl> >Content-Type: text/plain; charset="iso-8859-1" > > > > >---------------------------------------- >> To: tutor@python.org >> From: alan.ga...@btinternet.com >> Date: Sat, 2 Oct 2010 14:10:25 +0100 >> Subject: Re: [Tutor] data question >> >> >> "Roelof Wobben" wrote >> >>> As a test I would write a programm where a user can input game-data >>> like home-team, away-team, home-score, away-score) and makes a >>> ranking of it. >> >>> In which datatype can I put this data in. >>> >>> I thought myself of a dictonary of tuples. >> >> A dictionary would be good for the basic data but I assume there >> are more than one of these data items? If so what do they represent? >> How would they be used? >> >> We need a bit more information, even some sample datya might help. >> >> It could be a list of dictionaries or even a dictionary of >> dictionaries. >> >> Alan G. >> >> >> _______________________________________________ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor > >Hello Alan, > >What I meant was this: > >Let's say we have a tournament of 4 teams A,B,C,D > >They played this games. > >A - B 20 - 30 >C - D 23 - 67 > >These data must be stored so I can make a module which make a ranking like >this : > >1) C 1 - 2 76 - 23 >2) B 1 - 2 30 - 20 > >I hope you know what I wan > > >Roelof > > >------------------------------ > >Message: 5 >Date: Sat, 2 Oct 2010 13:40:21 +0000 >From: Roelof Wobben <rwob...@hotmail.com> >To: <alan.ga...@btinternet.com>, <tutor@python.org> >Subject: Re: [Tutor] data question >Message-ID: <snt118-w27a004d0eaddfa4f499acae...@phx.gbl> >Content-Type: text/plain; charset="iso-8859-1" > > >hello, > >Still one question. > >Every game is a dictonary/tuple ? > >Regards, > >Roelof > >---------------------------------------- >> Date: Sat, 2 Oct 2010 06:24:16 -0700 >> From: alan.ga...@btinternet.com >> Subject: Re: [Tutor] data question >> To: rwob...@hotmail.com >> >> OK, So you want a list of games (possibly one per tournament >> if you need to compare across tournies) where for each game >> you store: homeTeam, awayTeam and scores. >> >> Each game could be represented as either a tuple or a dictionary >> depending on how you want to extract the data: >> >> game['home'] or game[0] >> >> The list should probably be a list... :-) >> >> Try defining a short sample database in Python then try >> extracting some values to get a feel for what suits you >> best. Create the data in a module(easier to edit mistakes/changes) >> Then use the>>> prompt to import the data module and play >> around with it. >> >> That way it's easy to change from lists to tuples to dictionaries >> and see what works. >> >> Ultimately this may even be best done using a database but >> that's probably a step too far for you just now. >> >> Alan Gauld >> Author of the Learn To Program website >> http://www.alan-g.me.uk/ >> >> >> >> >> ----- Original Message ---- >>> From: Roelof Wobben >>> To: alan.ga...@btinternet.com; tutor@python.org >>> Sent: Saturday, 2 October, 2010 14:15:33 >>> Subject: RE: [Tutor] data question >>> >>> >>> >>> >>> ---------------------------------------- >>>> To: tutor@python.org >>>> From: alan.ga...@btinternet.com >>>> Date: Sat, 2 Oct 2010 14:10:25 +0100 >>>> Subject: Re: [Tutor] data question >>>> >>>> >>>> "Roelof Wobben" wrote >>>> >>>>> As a test I would write a programm where a user can input game-data >>>>> like home-team, away-team, home-score, away-score) and makes a >>>>> ranking of it. >>>> >>>>> In which datatype can I put this data in. >>>>> >>>>> I thought myself of a dictonary of tuples. >>>> >>>> A dictionary would be good for the basic data but I assume there >>>> are more than one of these data items? If so what do they represent? >>>> How would they be used? >>>> >>>> We need a bit more information, even some sample datya might help. >>>> >>>> It could be a list of dictionaries or even a dictionary of >>>> dictionaries. >>>> >>>> Alan G. >>>> >>>> >>>> _______________________________________________ >>>> Tutor maillist - Tutor@python.org >>>> To unsubscribe or change subscription options: >>>> http://mail.python.org/mailman/listinfo/tutor >>> >>> Hello Alan, >>> >>> What I meant was this: >>> >>> Let's say we have a tournament of 4 teams A,B,C,D >>> >>> They played this games. >>> >>> A - B 20 - 30 >>> C - D 23 - 67 >>> >>> These data must be stored so I can make a module which make a ranking like >>>this : >>> >>> 1) C 1 - 2 76 - 23 >>> 2) B 1 - 2 30 - 20 >>> >>> I hope you know what I wan >>> >>> >>> Roelof >>> > >------------------------------ > >Message: 6 >Date: Sat, 2 Oct 2010 09:02:41 -0400 >From: "Robert Berman" <berma...@cfl.rr.com> >To: "'Roelof Wobben'" <rwob...@hotmail.com>, <tutor@python.org> >Subject: Re: [Tutor] data question >Message-ID: <007801cb6232$18d1a370$4a74ea...@rr.com> >Content-Type: text/plain; charset="us-ascii" > > > >> -----Original Message----- >> From: tutor-bounces+bermanrl=cfl.rr....@python.org [mailto:tutor- >> bounces+bermanrl=cfl.rr....@python.org] On Behalf Of Roelof Wobben >> Sent: Saturday, October 02, 2010 4:35 AM >> To: tutor@python.org >> Subject: [Tutor] data question >> >> >> >> Hello, > >> Now my question is : >> >> In which datatype can I put this data in. >> >Perhaps a simple SQLlite database? >http://zetcode.com/databases/sqlitetutorial/ > >Hope this helps, > >Robert > > > >> Regards, >> >> Roelof >> >> _______________________________________________ >> Tutor maillist - Tutor@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor > > > >------------------------------ > >Message: 7 >Date: Sat, 02 Oct 2010 11:02:36 -0400 >From: bob gailer <bgai...@gmail.com> >To: tutor@python.org >Subject: Re: [Tutor] Coin Toss Problems >Message-ID: <4ca7498c.5070...@gmail.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 10/1/2010 6:52 AM, delegb...@dudupay.com wrote: >> This is also a learner's advice, so just give it a shot. >> In the first function, set HEADS to 0 and TAILS to 0. >> Then if flip==0, heads=heads+1 >> Return Heads. >> Do same for Tails and see if it makes any sense. >> Regards. > >Isn't Python case sensitive? > > >-- >Bob Gailer >919-636-4239 >Chapel Hill NC > > > >------------------------------ > >_______________________________________________ >Tutor maillist - Tutor@python.org >http://mail.python.org/mailman/listinfo/tutor > > >End of Tutor Digest, Vol 80, Issue 11 >************************************* _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor