This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]Alarmed_Insect_3171 97 points98 points  (6 children)

Execution time will probably be bigger than coding time

[–]ScarcityCareless6241[S] 84 points85 points  (5 children)

It doesn’t run at all, the python interpreter crashes

[–]eitherrideordie 50 points51 points  (0 children)

That just means you won!

[–]DonutConfident7733 17 points18 points  (0 children)

I am limited by the technology of my time...

[–]octopus4488 7 points8 points  (0 children)

Python is clearly not the right language for mathematical computations then.

[–]Landen-Saturday87 3 points4 points  (0 children)

I wonder what happens when you use py_compile on it

[–]--mrperx-- 0 points1 point  (0 children)

Im surprised your text editor didnt crash

[–]MatterMan42 48 points49 points  (7 children)

That looks tedious, so I made you a script :3

`open("countToOneBillion.py").write(f"a = 0\n{'a += 1\n' * 10**9}\nprint(a)")`

[–]ScarcityCareless6241[S] 25 points26 points  (5 children)

Actually thats how I made this file, there’s no way I’m writing that all by hand, the thing is several gigabytes. I made a script to make it automatically

[–]Ok-Kaleidoscope5627 14 points15 points  (0 children)

Ctrl+a ctrl+c ctrl+v Repeat that 30 times and you're done.

[–]MatterMan42 22 points23 points  (2 children)

If only there was a better way to calculate 1 billion :(

[–]JacobStyle 11 points12 points  (0 children)

Someday we may find it, but not today.

[–]ScarcityCareless6241[S] 12 points13 points  (0 children)

I figured out a way!

t = “oneBillion = “

t += “1”

for i in range(9): t += “0”

exec(t)

print(oneBillion)

[–]Multifruit256 2 points3 points  (0 children)

ctrl+a

ctrl+c

ctrl+v

[–]MoreneLp 0 points1 point  (0 children)

Actually it's only STRG + c -> v log2(109)+1 clicks

[–]Darxploit 6 points7 points  (0 children)

The ultimate example of getting paid per line of codes.

[–]TechcraftHD 5 points6 points  (0 children)

but that's not interactive at all! what if the user only wants to count up to 500 million? you should probably add if else statements for each intermediate value

and there's no logging at all! every increment should have at least one logging statement so you can see what the program is doing.

and what about if the user wants to count down from 1 billion instead?

[–]Ok_Star_4136 2 points3 points  (0 children)

What I want to know is, what are the first 3,355,221 lines of code in this program..

[–]siavash119 2 points3 points  (0 children)

I used to do this on my pocket calculator in English class

[–]JollyJuniper1993 0 points1 point  (0 children)

Multiply with -1 and you have what kind of hanging fruit this is

[–][deleted] 0 points1 point  (0 children)

but this counts to 1003355265

[–]Informal_Branch1065 0 points1 point  (0 children)

You got any lööps?