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

Update README.md #42

Merged
merged 40 commits into from
Dec 23, 2023
Merged

Update README.md #42

merged 40 commits into from
Dec 23, 2023

Conversation

MarkVRKS
Copy link

No description provided.


## ФИО
## Вераксо Марк Владимирович
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 Oct 7, 2023

@MarkVRKS поменяйте ветку назначения

1 uravneni'e
Первая формула д.з.
задача А + задача В
@jskonst jskonst changed the base branch from main to Verakso_Mark_Vladimirovich November 11, 2023 08:11
golang/math.go Outdated
x5 := 3.9

for x := 1.28; x <= 3.28; x += 0.4 {
verh := (1 + (math.Sin(b*b*b+x*x*x) * math.Sin(b*b*b+x*x*x)))
Copy link
Contributor

Choose a reason for hiding this comment

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

1 - вы же создали уже функцию для вычисления в 1 точке? используйте ее

golang/math.go Outdated
niz := math.Cbrt(b*b*b + x*x*x)
result := verh / niz

fmt.Println("(Задача А)Результат первой формулы из таблицы - ", result)
Copy link
Contributor

Choose a reason for hiding this comment

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

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

golang/math.go Outdated
Comment on lines 23 to 51
verh1 := (1 + (math.Sin(b*b*b+x1*x1*x1) * math.Sin(b*b*b+x1*x1*x1)))
niz1 := math.Cbrt(b*b*b + x1*x1*x1)
result1 := verh1 / niz1

fmt.Println("(Задача В)Результат формулы при [x1 = 1.1] - ", result1)

verh2 := (1 + (math.Sin(b*b*b+x2*x2*x2) * math.Sin(b*b*b+x2*x2*x2)))
niz2 := math.Cbrt(b*b*b + x2*x2*x2)
result2 := verh2 / niz2

fmt.Println("(Задача В)Результат формулы при [x2 = 2.4] - ", result2)

verh3 := (1 + (math.Sin(b*b*b+x3*x3*x3) * math.Sin(b*b*b+x3*x3*x3)))
niz3 := math.Cbrt(b*b*b + x3*x3*x3)
result3 := verh3 / niz3

fmt.Println("(Задача В)Результат формулы при [x3 = 3.6] - ", result3)

verh4 := (1 + (math.Sin(b*b*b+x4*x4*x4) * math.Sin(b*b*b+x4*x4*x4)))
niz4 := math.Cbrt(b*b*b + x4*x4*x4)
result4 := verh4 / niz4

fmt.Println("(Задача В)Результат формулы при [x4 = 1.7] - ", result4)

verh5 := (1 + (math.Sin(b*b*b+x5*x5*x5) * math.Sin(b*b*b+x5*x5*x5)))
niz5 := math.Cbrt(b*b*b + x5*x5*x5)
result5 := verh5 / niz5

fmt.Println("(Задача В)Результат формулы при [x5 = 3.9] - ", result5)

Choose a reason for hiding this comment

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

image

@@ -0,0 +1,18 @@
package MathInGo
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
Contributor

Choose a reason for hiding this comment

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

в каталоге internal

golang/math2 Outdated
@@ -0,0 +1,28 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

вот этот надо удалять

golang/math.go Outdated
@@ -0,0 +1,53 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

выносите в отдельный пакет и разбивайте на функции

@@ -0,0 +1,18 @@
package MathInGo
Copy link
Contributor

Choose a reason for hiding this comment

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

в каталоге internal

Введение функции в задачи А и В
Ненужный файл
доделать
golang/main.go Outdated
fmt.Println("Hello world")
fmt.Println("Вераксо Марк Владимирович 1/280")
fmt.Println(internal.1chast)
ДОДЕЛАТЬ
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 25, 2023

Удалите лишнее - если есть вопросы - напишите

@@ -0,0 +1,21 @@
package internal
Copy link
Contributor

Choose a reason for hiding this comment

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

не надо его в принципе пока размещать в репозитории - можете у себя локально на отдельной ветке

}
fmt.Println("Задача B")
x1 := 1.1
fmt.Println(funktion1(x1))
Copy link
Contributor

Choose a reason for hiding this comment

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

для задачи B нужно передать срез на вход в качестве параметров

Comment on lines 18 to 20
for x := 1.28; x <= 3.28; x += 0.4 {
fmt.Println(funktion1(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.

Именно цикл надо представить в видео функции?

golang/math.go Outdated
@@ -0,0 +1,53 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

кдалите уже этот файлик :)

добавление функции для цикла и среза
Убрал лишнее, теперь вывод результата проходит через импортирование этой папки
1 вариант про кошку,  сказали что необходимо догрузить его сегодня
Comment on lines 5 to 8
type cat struct {
name string
age int
}
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
Contributor

Choose a reason for hiding this comment

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

ну и простая рекомендация - выносите в отдельный пакет - потом увидите проблемы :) и зачем методы в том числе нужны

}

func cycle(xn, xk, xs float64) []float64 {
var valuefnk = []float64{}
Copy link
Contributor

Choose a reason for hiding this comment

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

используйте make для выделения под срезом массива нужного размера

Copy link
Contributor

Choose a reason for hiding this comment

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

вы же можете посчитать - (xk-xn)/ds +1 - примерно так

return cat.name
}

func main() {
Copy link
Contributor

Choose a reason for hiding this comment

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

да не может быть 2х main....

type cat struct {
name string
age int
colour string
Copy link
Contributor

Choose a reason for hiding this comment

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

а что с выравниванием?


func main() {
fmt.Println("Hello world")
answer1 := internal.Cycle(1.28, 3.28, 0.4)
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 Dec 22, 2023

ну и линтеры еще упали

@jskonst jskonst merged commit 7297ca6 into ISUCT:Verakso_Mark_Vladimirovich Dec 23, 2023
2 checks passed
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.

3 participants