Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sem3-ivt19-task1-1-mozgovoy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Мозговой Никита Александрович
sem3-ivt19-task1-1-mozgovoy
Commits
c476f98e
Commit
c476f98e
authored
Nov 09, 2020
by
Мозговой Никита Александрович
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lr5
parent
274e30df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
calculate.py
calculate.py
+4
-6
No files found.
calculate.py
View file @
c476f98e
...
...
@@ -50,10 +50,10 @@ def calculate(*args, **kwargs):
return
round
(
result_division
,
precision
)
# print(calculate(*list(range(1, 10)), "+", **PARAMS)
) # 1 + 2 + 3 + .. + 9
# print(calculate(*list(range(1, 10)), "-", **PARAMS)
)
print
(
calculate
(
*
list
(
range
(
1
,
5
)),
"/"
,
**
PARAMS
))
# print(calculate(*[1.0001, 2.2345], "*", **PARAMS)
) # 2.23472345
print
(
calculate
(
*
list
(
range
(
1
,
10
)),
"+"
,
**
PARAMS
),
'
\n
'
)
# 1 + 2 + 3 + .. + 9
print
(
calculate
(
*
list
(
range
(
1
,
10
)),
"-"
,
**
PARAMS
),
'
\n
'
)
print
(
calculate
(
*
list
(
range
(
1
,
5
)),
"/"
,
**
PARAMS
)
,
'
\n
'
)
print
(
calculate
(
*
[
1.0001
,
2.2345
],
"*"
,
**
PARAMS
),
'
\n
'
)
# 2.23472345
def
test_packed_calc_sum
():
...
...
@@ -63,5 +63,3 @@ def test_packed_calc_sum():
assert
type
(
calculate
(
*
inp1
,
action
,
**
PARAMS
))
is
type
(
45.0
),
'Type of sum is incorrect'
# test_packed_calc_sum()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment