Hi everybody,
I tried that but I have a wrong answer:
< exponents([2, 3, 4], [1, 2, 3])
should have returned [2, 4, 8, 3, 9, 27, 4, 16, 64]
, and it returned [2, 4, 8, 3, 9, 27, 4, 16, 64, 2, 4, 8, 3, 9, 27, 4, 16, 64, 2, 4, 8, 3, 9, 27, 4, 16, 64]/>
with these lines of code:
<>
new_lst =
def exponents(bases, powers):
for num in bases:
for exp in powers:
new_lst.append(num ** exp)
return new_lst
</>
return new_lst is same indentation than for num in bases
How do you use </> you put “p” inside or something else?
Thx