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
08daf9e7
Commit
08daf9e7
authored
Nov 26, 2020
by
Мозговой Никита Александрович
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lr 10
parent
b71def7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
calcprint.cpython-38.pyc
__pycache__/calcprint.cpython-38.pyc
+0
-0
calc-history.log.txt
calc-history.log.txt
+7
-7
calcprint.py
calcprint.py
+2
-2
No files found.
__pycache__/calcprint.cpython-38.pyc
View file @
08daf9e7
No preview for this file type
calc-history.log.txt
View file @
08daf9e7
+: (1, 2, 3, 4, 5, 6, 7, 8, 9) = 45.0
+: (1.000001, 2.000002, 3.00005) = 6.000053
+: (1, 2, 3, 4, 5, 6, 7, 8, 9) = 45.0
-: (1, 2, 3, 4, 5, 6, 7, 8, 9) = -45.0
/: (1, 2, 3, 4) = 0.04167
*: (1.0001, 2.2345) = 2.23472
+: (1, 2, 3, 4, 5, 6, 7, 8, 9) = 45.0
2020-11-26 13:59:15.377841 :
+: (1, 2, 3, 4, 5, 6, 7, 8, 9) = 45.0
2020-11-26 13:59:15.421833 :
+: (1.000001, 2.000002, 3.00005) = 6.000053
2020-11-26 13:59:15.425833 :
+: (1, 2, 3, 4, 5, 6, 7, 8, 9) = 45.0
2020-11-26 13:59:15.429832 :
-: (1, 2, 3, 4, 5, 6, 7, 8, 9) = -45.0
2020-11-26 13:59:15.433831 :
/: (1, 2, 3, 4) = 0.04167
2020-11-26 13:59:15.433831 :
*: (1.0001, 2.2345) = 2.23472
2020-11-26 13:59:15.433831 :
+: (1, 2, 3, 4, 5, 6, 7, 8, 9) = 45.0
calcprint.py
View file @
08daf9e7
from
datetime
import
datetime
def
print_results
(
*
args
,
action
=
None
,
result
=
None
):
"""
Вывод в табличном виде результатов вычислений
...
...
@@ -33,6 +34,5 @@ def print_results(*args, action=None, result=None):
def
write_log
(
*
args
,
action
=
None
,
result
=
None
,
file
=
'calc-history.log.txt'
):
f
=
open
(
file
,
mode
=
'a'
,
errors
=
'ignore'
)
f
.
write
(
f
"{action}: {args} = {result}
\n
"
)
f
.
write
(
f
"{datetime.now()}: {action}: {args} = {result}
\n
"
)
f
.
close
()
\ No newline at end of file
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