-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Halizova_Ann_Tasks(245gr) #124
base: Halizova_Anna_Romanovna
Are you sure you want to change the base?
Halizova_Ann_Tasks(245gr) #124
Conversation
python/src/main.py
Outdated
|
||
xrange=[1.88,2.26,3.84,4.55,-6.21] | ||
lenx=len(xrange) | ||
for i in range(0,lenx): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
по факту range вам не нужен - можно сделать проще for i in xrange:
Ну и да - надо править ошибки линтера |
def frange(start, stop, step): | ||
i = start | ||
while i < stop: | ||
yield i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это перебор с yield для данной задачи
python/src/ladfixed20var.py
Outdated
@@ -0,0 +1,24 @@ | |||
from numpy import arange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно, но не обязательно было
python/src/ladfixed20var.py
Outdated
for x in arange(1.23, 7.23, 1.2): | ||
a = 0.8 | ||
b = 0.4 | ||
print(y(x)) | ||
|
||
# B | ||
xrange = [1.88, 2.26, 3.84, 4.55, -6.21] | ||
xlen = len(xrange) | ||
for i in range(0, xlen): | ||
x = xrange[i] | ||
a = 0.8 | ||
b = 0.4 | ||
print(y(x)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вот эту часть стоит выносить в отдельные функции
Все равно линтер не работает |
python/src/labfixed2.py
Outdated
@@ -0,0 +1,26 @@ | |||
from numpy import arange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не нужно вам столкьо файлов - только 1 версию залейте
@@ -5,3 +5,29 @@ def summ(a: int, b: int) -> int: | |||
if __name__ == "__main__": | |||
print("Hello world") | |||
print(summ(3, 4)) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В работе сейчас примерно 4 файла с решением одной и той же задачи - залейте только 1 - финальный вариант
У вас оооочень много файлов дублируется - оставьте только те, которые нужно проверить |
Здравствуйте, то есть мне ненужные файлы отсюда удалить? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а где правильный файл?
да - тут еще остается файл 120 |
Скажите пожалуйста, задания codewars я тоже здесь оставила-это правильно? Или их не сюда надо? |
def y(x): | ||
y = ((((x - a) ** 2) ** (1.0 / 3)) + (abs(x + b) ** (1.0 / 5))) / ((x ** 2 - (a + b) ** 2) ** (1.0 / 9)) | ||
return y | ||
|
||
|
||
for x in frange(1.23, 7.23, 1.2): | ||
a = 0.8 | ||
b = 0.4 | ||
print(y(x)) | ||
# B | ||
xrange = [1.88, 2.26, 3.84, 4.55, -6.21] | ||
lenx = len(xrange) | ||
for i in range(0, lenx): | ||
x = xrange[i] | ||
a = 0.8 | ||
b = 0.4 | ||
print(y(x)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тогда вот эти функции не нужны?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эти нет, в l20 я по-другому их сделала
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ТОгда удалите все что не нужно
x = 1.23 | ||
while x < 7.23: | ||
a = 0.8 | ||
b = 0.4 | ||
print(y(x)) | ||
x += 1.2 | ||
|
||
# задача B | ||
A = [1.88, 2.26, 3.84, 4.55, -6.21] | ||
a = 0.8 | ||
b = 0.4 | ||
for x in A: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вынесите решение задач а и б в отдельные функции
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хорошо, поняла. Нужно будет еще коммит сюда?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да - а из другого файла все ненужное удалите
x = 1.23 | ||
while x < 7.23: | ||
a = 0.8 | ||
b = 0.4 | ||
print(y(x)) | ||
x += 1.2 | ||
|
||
# задача B | ||
A = [1.88, 2.26, 3.84, 4.55, -6.21] | ||
a = 0.8 | ||
b = 0.4 | ||
for x in A: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да - а из другого файла все ненужное удалите
No description provided.