Skip to content
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

Open
wants to merge 10 commits into
base: Halizova_Anna_Romanovna
Choose a base branch
from

Conversation

HalizovaAnna
Copy link

No description provided.

@HalizovaAnna HalizovaAnna changed the title commitzhenya Halizova_Ann_Tasks(245gr) Nov 12, 2022
@HalizovaAnna HalizovaAnna changed the base branch from master to Halizova_Anna_Romanovna November 12, 2022 07:26

xrange=[1.88,2.26,3.84,4.55,-6.21]
lenx=len(xrange)
for i in range(0,lenx):
Copy link
Contributor

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:

@jskonst
Copy link
Contributor

jskonst commented Nov 12, 2022

Ну и да - надо править ошибки линтера

def frange(start, stop, step):
i = start
while i < stop:
yield i
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это перебор с yield для данной задачи

@@ -0,0 +1,24 @@
from numpy import arange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно, но не обязательно было

Comment on lines 12 to 24
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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот эту часть стоит выносить в отдельные функции

@jskonst
Copy link
Contributor

jskonst commented Nov 26, 2022

Все равно линтер не работает

@@ -0,0 +1,26 @@
from numpy import arange
Copy link
Contributor

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))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В работе сейчас примерно 4 файла с решением одной и той же задачи - залейте только 1 - финальный вариант

@jskonst
Copy link
Contributor

jskonst commented Nov 29, 2022

У вас оооочень много файлов дублируется - оставьте только те, которые нужно проверить

@HalizovaAnna
Copy link
Author

Здравствуйте, то есть мне ненужные файлы отсюда удалить?

Copy link
Contributor

@jskonst jskonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а где правильный файл?

@jskonst
Copy link
Contributor

jskonst commented Dec 2, 2022

Здравствуйте, то есть мне ненужные файлы отсюда удалить?

да - тут еще остается файл 120

@HalizovaAnna
Copy link
Author

Скажите пожалуйста, задания codewars я тоже здесь оставила-это правильно? Или их не сюда надо?

Comment on lines +17 to +33
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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тогда вот эти функции не нужны?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эти нет, в l20 я по-другому их сделала

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ТОгда удалите все что не нужно

Comment on lines +10 to +21
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вынесите решение задач а и б в отдельные функции

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хорошо, поняла. Нужно будет еще коммит сюда?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да - а из другого файла все ненужное удалите

Comment on lines +10 to +21
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да - а из другого файла все ненужное удалите

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants