Hello all,
I know I make a lot of threads, but I'm eager to learn python
. Plus I'm gone on vacation next week, so you won't have to put up with me anymore
.
I'm doing some simple problems to help expand my grasp on python. Right now I'm attempting LASTDIG.
I've searched Google, and sadly it doesn't answer my query for some reason
How can I get 2 variables on the same line?
my code so far
n = input()
i = 0
while (i < n):
i += 1
a = input()
b = input()
if a == 0 & b == 0:
print "1"
else:
bignum = a ** b
for x in range(1,1000000):
lastdig = bignum % 10
if lastdig < 10:
break
print lastdig