PDA

View Full Version : Fun python code


Eiliosdraye
06-13-2009, 03:30 PM
a = 1
while a > 0:
a = a + 1
print a


Compile this with your favourite python interpreter, all compaq computers, mac computers, and any linux distro will run it automatically. Or, just use python and type python (filename).py

Watch the fun begin.

HWV
06-13-2009, 03:50 PM
no....that would be bad....

Eiliosdraye
06-13-2009, 03:52 PM
Why? It's fun to see how high you can get, I can get up to 30 million. :D

EDIT: Doesn't even lag, opened it in 8 tabs, still no effect on my system.

Cobra
06-13-2009, 04:07 PM
you sir have failed:

C:\Users\Breland\Desktop>lol.py
File "C:\Users\Breland\Desktop\lol.py", line 4
print a
^
SyntaxError: invalid syntax

Eiliosdraye
06-13-2009, 05:03 PM
you sir have failed:

C:\Users\Breland\Desktop>lol.py
File "C:\Users\Breland\Desktop\lol.py", line 4
print a
^
SyntaxError: invalid syntax
Are you using 2.6?

Cobra
06-13-2009, 08:11 PM
eww no, 3.0 :)

Eiliosdraye
06-13-2009, 08:21 PM
eww no, 3.0 :)
I used 2.6 to do that.

The code would be

a = 1
while a > 0:
a = a + 1
print(a)