Re: [Tutor] can anyone help me in solving this problem this is urgent

2009-11-07 Thread Prasad Mehendale
On Sunday 08 November 2009 07:43 am, tutor-requ...@python.org wrote: > > In general we don't provide answers to homework questions on this list. > But we will try to point you in the right direction. But it helps if you > show us what you've tried so far and tell us what went wrong. Include any

Re: [Tutor] can anyone help me in solving this problem this is urgent

2009-11-07 Thread Alan Gauld
"surjit khakh" wrote Write a python program to read a text file named “text.txt” and show the number of times each article is found in the file. In general we don't provide answers to homework questions on this list. But we will try to point you in the right direction. But it helps if you sh

Re: [Tutor] can anyone help me in solving this problem this is urgent

2009-11-07 Thread Emile van Sebille
On 11/6/2009 4:24 PM surjit khakh said... Write a python program to read a text file named “text.txt” and show the number of times each article is found in the file. Articles in the English language are the words “a”, “an”, and “the”. Sounds like you're taking a python class. Great! It's p

Re: [Tutor] can anyone help me in solving this problem this is urgent

2009-11-07 Thread Shashwat Anand
naive and unoptimized method: >>> file = open("text.txt", 'r') >>> s = file.read() >>> s 'an elephant jump across the room\nhe met a guy\nthe guy was an moron\n' >>> s = " "+s.replace('\n', ' ')+" " >>> s.count(' a ') 1 >>> s.count(' an ') 2 >>> s.count(' the ') 2 On Sat, Nov 7, 2009 at 5:54 AM,

[Tutor] can anyone help me in solving this problem this is urgent

2009-11-07 Thread surjit khakh
Write a python program to read a text file named “text.txt” and show the number of times each article is found in the file. Articles in the English language are the words “a”, “an”, and “the”. ___ Tutor maillist - Tutor@python.org To unsubscribe or chan

Re: [Tutor] Can anyone help me plz

2006-04-13 Thread Kent Johnson
John Brokaw wrote: > I'am very new to pygame, and python and any help would help me so much thx. > I have no idea whats wrong the chimp.py ex. works perfect, but when I > get to http://rene.f0o.com/mywiki/*LECTURETHREE* > *, *I get so stuck becuz the > ca

[Tutor] Can anyone help me plz

2006-04-13 Thread John Brokaw
I'am very new to pygame, and python and any help would help me so much thx. I have no idea whats wrong the chimp.py ex. works perfect, but when I get to http://rene.f0o.com/mywiki/LECTURETHREE, I get so stuck becuz the call window = pygame.display.set_mode((468, 60)) makes a window like it should

Re: [Tutor] Can anyone help me?

2005-10-29 Thread Nick.Pomponio
2005 11:08 AMTo: bob; Tutor@python.orgSubject: Re: [Tutor] Can anyone help me? But the odds that you will win are not impacted by the number of tickets that are sold in total...only the number you buy.  When you take into account the total number of tickets sold, all you get are the odds that

[Tutor] Can anyone help me?

2005-10-28 Thread Terry Kemmerer
> >If I create a program that randomly draws 6 numbers, its like the lottery. > >According to an article I read in Reader's Digest, if you get a Quick Pick > >- which is six numbers at random - you increase your odds of winning. > > Odds are how many tickets you buy relative to how many t

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Terry Carroll
On Fri, 28 Oct 2005, bob wrote: > At 09:42 PM 10/27/2005, Nathan Pinno wrote: > > >If I create a program that randomly draws 6 numbers, its like the lottery. > >According to an article I read in Reader's Digest, if you get a Quick Pick > >- which is six numbers at random - you increase your odd

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Mark Brown
de] > >Enjoy! >Nathan Pinno >For great sites go to: http://falcon3166.tripod.com >MSN Messenger: [EMAIL PROTECTED],com >Yahoo! Messenger: spam_swatter31 >ICQ: 199020705 >AIM: f3mighty >- Original Message ----- >From: "Alan Gauld" <[EMAIL PROTECTED]>

Re: [Tutor] Can anyone help me?

2005-10-28 Thread bob
;- Original Message - >From: "Alan Gauld" <[EMAIL PROTECTED]> >To: "Nathan Pinno" <[EMAIL PROTECTED]>; >Sent: Friday, October 28, 2005 2:01 AM >Subject: Re: [Tutor] Can anyone help me? > > > > Nathan, > > > > look at the functions

Re: [Tutor] Can anyone help me?

2005-10-28 Thread bob
hon.org Subject: Re: [Tutor] Can anyone help me? At 07:28 AM 10/28/2005, Smith, Jeff wrote: Aren't the odds just based on how many tickets you buy?  The odds aren't affected by different people buying more tickets.  If only one person buys a ticket in the entire lottery system, his od

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Smith, Jeff
AMTo: Smith, Jeff; Tutor@python.orgSubject: Re: [Tutor] Can anyone help me?At 07:28 AM 10/28/2005, Smith, Jeff wrote: Aren't the odds just based on how many tickets you buy?  The odds aren'taffected by different people buying more tickets.  If only one personbuys a ticke

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Nathan Pinno
: spam_swatter31 ICQ: 199020705 AIM: f3mighty - Original Message - From: "Alan Gauld" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Friday, October 28, 2005 2:01 AM Subject: Re: [Tutor] Can anyone help me? > Nathan, > > look at t

Re: [Tutor] Can anyone help me?

2005-10-28 Thread bob
At 07:28 AM 10/28/2005, Smith, Jeff wrote: Aren't the odds just based on how many tickets you buy?  The odds aren't affected by different people buying more tickets.  If only one person buys a ticket in the entire lottery system, his odds of winning are the same as if two people play, and the sam

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Smith, Jeff
lay. Jeff -Original Message- From: bob [mailto:[EMAIL PROTECTED] Sent: Friday, October 28, 2005 10:17 AM To: Nathan Pinno; Tutor@python.org Subject: Re: [Tutor] Can anyone help me? At 09:42 PM 10/27/2005, Nathan Pinno wrote: >If I create a program that randomly draws 6 numbers, its like

Re: [Tutor] Can anyone help me?

2005-10-28 Thread bob
At 09:42 PM 10/27/2005, Nathan Pinno wrote: >If I create a program that randomly draws 6 numbers, its like the lottery. >According to an article I read in Reader's Digest, if you get a Quick Pick >- which is six numbers at random - you increase your odds of winning. Odds are how many tickets yo

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Johan Geldenhuys
>>> def randnum(): ...           c = [] ...   for x in range(6): ... s = random.randrange(50) ... c.append(s) ...   print 'Randoms: ',c ...   c = [] This works good !! Johan R. Alan Monroe wrote: Hey all, I am trying to create

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Alan Gauld
Nathan, look at the functions in the random module. randrange() would be one potential candidate. Alan G - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: Sent: Friday, October 28, 2005 3:07 AM Subject: [Tutor] Can anyone help me? Hey all, I am tr

Re: [Tutor] Can anyone help me?

2005-10-27 Thread Nathan Pinno
yself. Nathan Pinno Crew, McDonalds Restaurant and fan extraordinare of the Oilers. http://falcon3166.tripod.com From: bob <[EMAIL PROTECTED]>To: "Nathan Pinno" <[EMAIL PROTECTED]>, Subject: Re: [Tutor] Can anyone help me?Date: Thu, 27 Oct 2005 21:35:07 -0700>At 07:07 PM

Re: [Tutor] Can anyone help me?

2005-10-27 Thread bob
At 07:07 PM 10/27/2005, Nathan Pinno wrote: >Hey all, >I am trying to create a program that draws 6 numbers between 1 and 49 at >random for creating lottery tickets. I want to have a better chance when I >play. Define "better chance". Lottery odds are how many tickets you buy relative to how ma

Re: [Tutor] Can anyone help me?

2005-10-27 Thread R. Alan Monroe
> Hey all, > I am trying to create a program that draws 6 numbers between 1 and 49 at > random for creating lottery tickets. I want to have a better chance when I > play. Can anyone help me code this or show me how > to, please? Create (empty for now) list to hold your final numbers. Have a for-

[Tutor] Can anyone help me?

2005-10-27 Thread Nathan Pinno
Hey all, I am trying to create a program that draws 6 numbers between 1 and 49 at random for creating lottery tickets. I want to have a better chance when I play. Can anyone help me code this or show me how to, please? Thanks, Nathan Pinno For great sites go to: http://falcon3166.tripod.comMSN