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 add an integer value to each element in the list So that so that calculations can be automated.
Assumptions:
There should be a main.py file with the following content.
@math_ns.route('/add/<int:integer>')@math_ns.doc(params={'integer': 'Integer value.'}, description='Add integer value to list.')classAddList(Resource):
defput(self, integer):
returnms.add_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
defadd_list(integer_list, integer_value):
""" Add an integer value to every integer in the list. Receives -------- integer_list : list List of integers. integer_value : integer Integer value to be added to the list. Returns ------- added_list : list List of integers added to input value. """added_list= [x+integer_valueforxininteger_list]
integer_list.clear()
integer_list.extend(added_list)
returninteger_list
There should be a test/math_test.py file with the following content.
As a user
I need to add an integer value to each element in the list
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: