-
Notifications
You must be signed in to change notification settings - Fork 92
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
Update README.md #42
Conversation
|
||
## ФИО | ||
## Вераксо Марк Владимирович |
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.
Все ок - только поменяйте плиз ветку назначения
@MarkVRKS поменяйте ветку назначения |
1 uravneni'e
Первая формула д.з.
задача А + задача В
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))) |
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 - вы же создали уже функцию для вычисления в 1 точке? используйте ее
golang/math.go
Outdated
niz := math.Cbrt(b*b*b + x*x*x) | ||
result := verh / niz | ||
|
||
fmt.Println("(Задача А)Результат первой формулы из таблицы - ", result) |
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.
начинаем выносить в отдельную функцию
golang/math.go
Outdated
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) |
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.
golang/MathInGo.go
Outdated
@@ -0,0 +1,18 @@ | |||
package MathInGo |
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.
в каталоге internal
golang/math2
Outdated
@@ -0,0 +1,28 @@ | |||
package main |
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.
вот этот надо удалять
golang/math.go
Outdated
@@ -0,0 +1,53 @@ | |||
package main |
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.
выносите в отдельный пакет и разбивайте на функции
golang/MathInGo.go
Outdated
@@ -0,0 +1,18 @@ | |||
package MathInGo |
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.
в каталоге internal
Введение функции в задачи А и В
Ненужный файл
доделать
golang/main.go
Outdated
fmt.Println("Hello world") | ||
fmt.Println("Вераксо Марк Владимирович 1/280") | ||
fmt.Println(internal.1chast) | ||
ДОДЕЛАТЬ |
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.
хм - вот тут линтер должен просто все красным окарасить
Удалите лишнее - если есть вопросы - напишите |
golang/internal/cat_1_variant
Outdated
@@ -0,0 +1,21 @@ | |||
package internal |
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.
не надо его в принципе пока размещать в репозитории - можете у себя локально на отдельной ветке
golang/internal/sample.go
Outdated
} | ||
fmt.Println("Задача B") | ||
x1 := 1.1 | ||
fmt.Println(funktion1(x1)) |
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.
для задачи B нужно передать срез на вход в качестве параметров
golang/internal/sample.go
Outdated
for x := 1.28; x <= 3.28; x += 0.4 { | ||
fmt.Println(funktion1(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.
Именно цикл надо представить в видео функции?
golang/math.go
Outdated
@@ -0,0 +1,53 @@ | |||
package main |
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 вариант про кошку, сказали что необходимо догрузить его сегодня
golang/internal/cat_1_var.go
Outdated
type cat struct { | ||
name string | ||
age int | ||
} |
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.
ну и простая рекомендация - выносите в отдельный пакет - потом увидите проблемы :) и зачем методы в том числе нужны
golang/internal/sample.go
Outdated
} | ||
|
||
func cycle(xn, xk, xs float64) []float64 { | ||
var valuefnk = []float64{} |
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.
используйте make для выделения под срезом массива нужного размера
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.
вы же можете посчитать - (xk-xn)/ds +1 - примерно так
добавил переменную в fnk1
debug
golang/internal/lab5/cat1.go
Outdated
return cat.name | ||
} | ||
|
||
func main() { |
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.
да не может быть 2х main....
golang/internal/lab5/cat1.go
Outdated
type cat struct { | ||
name string | ||
age int | ||
colour string |
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.
а что с выравниванием?
|
||
func main() { | ||
fmt.Println("Hello world") | ||
answer1 := internal.Cycle(1.28, 3.28, 0.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.
вот тут пример с использованием структуры кота пожалуйста
ну и линтеры еще упали |
No description provided.