Log in with a social network:
Log in with your username or email:
Now for 3.
Of course, you can simply do it by hand, but it`s not really the point.
Onwards to Q2!
>>> pow(2, 38)
I`ve not figured out how to get `to the power of`, given that I`ve been doing it for about five minutes, but here`s my first attempt which solves the first one.
(And yes, I know you can just do it on a calculator, but I`m entering into the pythin spirit)
>>> a, b = 2, 38>>> while b > 0: print a print b a, b = a*2, b-1
To save a lot of people the trouble, there`s no real point in just copying the answers from a spoiler page, and you`re unlikely to get anywhere if you can`t write programs, if not in python, at least in some language.
This should be a good little challenge, I think.
level 0: just 2^38Level1: http://www.pythonchallenge.com/pc/def/oc...
I don`t actually know python at all, so this is hard. I`m stuck on level 3.
i hope you didnt translate it by hand. thats what computers are for.doing it in by hand is inefficient and that`s why this text is so long.using string.maketrans() is recommended. now apply on the url