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.
- Host: GitHub
- URL: https://github.com/candytale55/list-of-bases-times-list-of-exponents-py
- Owner: candytale55
- Created: 2021-01-24T14:13:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-24T14:24:01.000Z (over 4 years ago)
- Last Synced: 2023-05-29T01:21:01.393Z (about 2 years ago)
- Topics: codecademy, exponent, nested-loops, python-lists
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0