Re: Boxes of O's

2014-03-01 Thread Dave Angel
genius...@gmail.com Wrote in message: > Well, This is what i got > > n = int(input("enter number of o: ")) > > for i in range(n): > print("O", end = '') > for j in range(n* 2): > print("O", end = '') > > print() > Are you permitted to write and call functions? If so,

Re: [OT] Can global variable be passed into Python function?

2014-03-01 Thread Dave Angel
Grant Edwards Wrote in message: > On 2014-02-24, Michael Torrie wrote: > >> >> Why would you think that? The address of the start of your malloc'ed >> structure is the same as the address of the first element. Surely >> this is logical? > > Not only is it logical, the C standard explicitly req

Re: [OT] Can global variable be passed into Python function?

2014-03-01 Thread Chris Angelico
On Sun, Mar 2, 2014 at 3:02 PM, Dave Angel wrote: > The quote you make from the C standard doesn't mention malloc, so > you're arguing different things. It's not the compiler that casts > the malloc return value to the struct type. > > C++ does implicitly convert the result, and the return val

Re: posting code snippets

2014-03-01 Thread Gregory Ewing
Grant Edwards wrote: You drag out the lab scope, logic analyzer, spectrum analyzer, sweep generator, strip plotter, and the machine that goes "ping". You start to get everything set up to nail that problem securely to the dissecting board. Long before you actually get to that point, the proble

Re: Mac vs. Linux for Python Development

2014-03-01 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmrBU9K0aoJyCUmif1FCExtbsuq27pGxiRvyNd=yvn-...@mail.gmail.com... > > The point of this thread isn't really about Windows, so I'll try to > keep it brief, but there are a couple of things I should clarify. The > first one is about the 4+ second import t

Re: Mac vs. Linux for Python Development

2014-03-01 Thread Chris Angelico
On Sun, Mar 2, 2014 at 4:51 PM, Frank Millman wrote: > Which version are you talking about? > > I have an old, slow box running Windows Server 2003 and python 3.3.2. > > I have just booted it up now, called up a command prompt, typed 'python' to > start the interpreter, and typed 'import decimal'.

Re: How to run multiple virtualenv in product server

2014-03-01 Thread Cameron Simpson
On 27Feb2014 07:29, YE SHANG wrote: > I'm starting to learn virtualenv, I wonder how run python project developed > in virtualenv. > > Here is my situation, there is a server we can access with a common user name > and password, there are many py scripts wrote by different people on this > ser

Re: Mac vs. Linux for Python Development

2014-03-01 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmrmJjiGMfqui=PpJco7LjtqVpUjj=xnmtybyqemxg3...@mail.gmail.com... > On Sun, Mar 2, 2014 at 4:51 PM, Frank Millman wrote: >> Which version are you talking about? >> >> I have an old, slow box running Windows Server 2003 and python 3.3.2. >> >> I have jus

Re: Help with "Guess the number" script

2014-03-01 Thread Larry Hudson
On 03/01/2014 05:11 PM, Scott W Dunning wrote: On Mar 1, 2014, at 11:03 AM, Susan Aldridge wrote: Try this def guess1(upLimit = 100): import random num = random.randint(1,upLimit) count = 0 gotIt = False while (not gotIt): print('Guess a number between 1 and', upLi

<    1   2