Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reed_solomon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darius.briquet
reed_solomon
Commits
59d038bf
Commit
59d038bf
authored
3 years ago
by
jonas.stirnema
Browse files
Options
Downloads
Plain Diff
Merge branch '14-fix-the-show-method' into 'main'
Resolve "Fix the show method" Closes
#14
See merge request
!13
parents
8c4e1d67
efb3ccc1
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
Resolve "Fix the show method"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polynome.py
+5
-8
5 additions, 8 deletions
polynome.py
with
5 additions
and
8 deletions
polynome.py
+
5
−
8
View file @
59d038bf
...
...
@@ -9,19 +9,16 @@ class polynome():
self
.
prime_mod
=
229
def
show
(
self
):
# TODO: OPTIMIZE IFs
for
i
in
range
(
len
(
self
.
coefs
)
-
1
,
-
1
,
-
1
):
power
=
""
if
self
.
coefs
[
i
]
!=
0
:
coef
=
str
(
self
.
coefs
[
i
])
if
i
!=
0
:
# its not 0's degree
power
=
f
"
x^
{
i
}
+
"
else
:
coef
=
""
if
i
!=
0
:
power
=
f
"
x^
{
i
}
+
"
else
:
power
=
""
print
(
f
"
{
coef
}{
power
}
"
,
end
=
""
)
print
()
print
(
f
"
{
coef
}{
power
}
"
,
end
=
""
)
print
()
# new line
def
add
(
self
,
poly_2
):
coeff_poly_1
=
self
.
coefs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment