You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
As a user I need to power each element in the list by an integer value So that so that calculations can be automated.
Assumptions:
There should be a main.py file with the following content.
@math_ns.route('/power/<int:integer>')@math_ns.doc(params={'integer': 'Integer value.'}, description='Power list to an integer.')classPowerList(Resource):
defput(self, integer):
returnms.power_list(my_list, integer)
The main.py file should include an external file above the from src import basic_services as bs line.
fromsrcimportmath_servicesasms
There should be a src/math_services.py file with the following content
defpower_list(integer_list, integer_value):
""" Power every integer in the list to an integer value. Receives -------- integer_list : list List of integers. integer_value : integer Integer value to which every element should be powered. Returns ------- powered_list : list List of integers powered to input value. """powered_list= [x**integer_valueforxininteger_list]
integer_list.clear()
integer_list.extend(powered_list)
returninteger_list
There should be a test/math_test.py file with the following content.
As a user
I need to power each element in the list by an integer value
So that so that calculations can be automated.
Assumptions:
main.py
file with the following content.main.py
file should include an external file above thefrom src import basic_services as bs
line.src/math_services.py
file with the following contenttest/math_test.py
file with the following content.Acceptance criteria:
The text was updated successfully, but these errors were encountered: