Ok after looking at everyones replies my program looks like this:
#Coin Toss Game
#Zameer Manji
import random
print "This game will simulate 100 coin tosses and then tell you the
number of head's and tails"
tosses = 0
heads = 0
tails = 0
while tosses<100:
if tosses<100:
coin = rando
Hi, I have a question about the use of a sock server under python.
I wanna a little program I'm writing to use a sock server, either version 4 or 5.
How can I make it communicating through a such SOCKS server under
python, without using a SOCKScap like software, but easily using
something like a
Kent, Johan:
Thank you. These examples will be a great help. I also found some links
via Google (I always forget that resource for some reason). I have enough
to go forward, now.
Barry
> -Original Message-
> From: Johan Geldenhuys [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November
DirectFB is short for Direct Frame Buffer, and allows access to a graphical
frame buffer system in *nix (and I think maybe MacOSX) from a text prompt
without going through X.
Anyone know of a module to access this through Python? I've googled for it,
but didn't know if anyone here knew about so
I've done some network programming mostly with TCP and I don't think
that the way the client connects to the server is a lot different (if
any), The only difference is when you must decide the protcol family.
"socket.SOCK_DGRAM" will be for UDP and "socket.SOCK_STREAM" will be for
TCP. After th
Carroll, Barry wrote:
> Yes, that is exactly what I want. I need to write a program that
> communicates with an existing server, using the UDP protocol. This is
> my first time writing such a program, and I need help getting started.
Here is an example from Python Network Programming, by John
Greetings:
I tried running first just the expression, then the statement. Here are the
results:
>>> tosses = 100<0
>>> tosses
False
>>> while tosses = 100<0:
File "", line 1
while tosses = 100<0:
^
SyntaxError: invalid syntax
>>>
Coming from the C/C++ world as I do, I wa
Johan, et al:
Yes, that is exactly what I want. I
need to write a program that communicates with an existing server, using the
UDP protocol. This is my first time writing such a program, and I need
help getting started.
Thanks again.
Barry
From: Johan Geldenh
The best free app I've found for this is MusicBrainz [www.musicbrainz.com].
This has a huge database of obsessively correct details of albums
which can be formatted in anyway you choose. It can automatically
recognise which song an MP3 is!
This is a similar script I wrote to renumber files in se
Sorry, wrong list.
Many apologies.
Ed
On 01/11/05, Ed Singleton <[EMAIL PROTECTED]> wrote:
> The best free app I've found for this is MusicBrainz [www.musicbrainz.com].
>
> This has a huge database of obsessively correct details of albums
> which can be formatted in anyway you choose. It can au
At 08:52 PM 10/31/2005, Steve Bergman wrote:
>Say I have a function:
>def f(self, **kwargs) :
FWIW you don't have a function at this point. You have a def statement
which must be followed by at least one indented statement, which in turn
must be executed. Then you have a function.
>and I want t
Thanks Danny.
On 11/1/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
>
>
> > I was perusing the standard library, and was wondering if anyone knew
> > how the internals of Python work, roughly or no.
> >
> > Basically, I assume os.pipe() resides in a DLL somewhere, yet when I
> > open up Python24.DLL i
> #Coin Toss Game
>
> print "This game will simulate 100 coin tosses and then tell you the
> number of head's and tails"
>
> import random
>
> tosses = 0
> heads = 0
> tails = 0
>
> while tosses = 100<0:
>coin = randrange(1)
>tosses +=1
>if coin == 0:
> heads +=1
> prin
13 matches
Mail list logo