An open API service indexing awesome lists of open source software.

https://github.com/candytale55/list-of-bases-times-list-of-exponents-py

exponents() takes two lists as parameters named bases and powers. It returns a new list containing every number in bases raised to every number in powers. For example with exponents([2, 3, 4], [1, 2, 3]) the result would be the list [2, 4, 8, 3, 9, 27, 4, 16, 64] because it would first include the three solutions for base 2 [(2**1), (2**2) and (2**3)], then for the next base (3) and so on.
https://github.com/candytale55/list-of-bases-times-list-of-exponents-py

codecademy exponent nested-loops python-lists

Last synced: 3 months ago
JSON representation

exponents() takes two lists as parameters named bases and powers. It returns a new list containing every number in bases raised to every number in powers. For example with exponents([2, 3, 4], [1, 2, 3]) the result would be the list [2, 4, 8, 3, 9, 27, 4, 16, 64] because it would first include the three solutions for base 2 [(2**1), (2**2) and (2**3)], then for the next base (3) and so on.

Awesome Lists containing this project