Why can't IT management majors into for loops?

why can't IT management majors into for loops?

v={}
v["two0"]=1
for i in range(1,30):
v["two"+str(i)]=v["two"+str(i-1)]*2
print("2 to the 20th power = ",v["two20"])

You can't name variables by evaluating.

>recommends using for loop instead of just 2^20. goddam kys already

pow() are for casual faggots.

Loops and other flow control directives introduce additional complexity into the application source code. To avoid hiring expensive, experienced developers it is always preferable to program in the most basic way possible.

2nd

def power(x,y):
z=x
for i in range(0,y):
z*=x
return x


2**10


pow(2,10)


import math
math.pow(2,10)


Pick one.

Idk is it faster to do a lookup or binary shift for power of 2? You'd have to go to memory (slow) instead of reg right?

Not a computer guy so idk.

Forgot 1

How would binary shift work? It will just skip to the next power of two plus the value of the ones in the original number.

>manager pushes a problem on to me
>it's this, this is what's wrong
>'No, you're wrong, it can't be that'
>it is that
>EVERY
>TIME
Fuck this.

binary right shift just adds a multiple of 2 to your number. in the same way adding a 1 to the left of 100 is adding a thousand.

welcome to work. you have to learn to defend your claims and decisions.

any modern compiler will optimize multiplication by two into a left shift of one

two0=1
for i in range(1,30):
exec("two"+str(i)+"="+str(eval("two"+str(i-1))*2))
print("2 to the 20th power =",two20)

Oh wait you can.

a = {a:2}
a = {a:a*2}

>multiplying an object

but everything is an object

They just don't give a fuck. Like a baws.

What is even "IT management"?

2 xor 20
nice

Just like myself.
That's what I thought.

Not ideas, ``anonymous''.

Related

or just

1048576

Math.pow(2, 20);