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 multiply 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('/multiply/<int:integer>')@math_ns.doc(params={'integer': 'Integer value.'}, description='Multiply list by an integer.')classMultiplyList(Resource):
defput(self, integer):
returnms.multiply_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
defmultiply_list(integer_list, integer_value):
""" Multiply every integer in the list by an integer value. Receives -------- integer_list : list List of integers. integer_value : integer Integer value by which every element should be multiplied. Returns ------- multiplied_list : list List of integers multiplied by input value. """multiplied_list= [integer_value*xforxininteger_list]
integer_list.clear()
integer_list.extend(multiplied_list)
returninteger_list
There should be a test/math_test.py file with the following content.
As a user
I need to multiply 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: