Skip to content

first try to test#1

Open
Testbek wants to merge 2 commits intomainfrom
SW
Open

first try to test#1
Testbek wants to merge 2 commits intomainfrom
SW

Conversation

@Testbek
Copy link
Copy Markdown
Owner

@Testbek Testbek commented Feb 6, 2025

No description provided.

Copy link
Copy Markdown

@dirtymew dirtymew left a comment

Choose a reason for hiding this comment

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

Привет Вячеслав

Хорошая работа - но есть замечания которые нужно поправить.

Comment thread main.go
func (t Training) meanSpeed() float64 {
// вставьте ваш код ниже
...
return t.distance() / t.Duration.Hours()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут возможно деление на 0 - стоило избежать

Comment thread main.go Outdated
func (r Running) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return InfoMessage{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут неверно см задание внимательно

Comment thread main.go Outdated
func (w Walking) Calories() float64 {
// вставьте ваш код ниже
...
return ((CaloriesWeightMultiplier*w.Weight + (math.Pow(w.meanSpeed(), 2)/w.Height)*CaloriesSpeedHeightMultiplier*w.Weight) * w.Duration.Hours() * MinInHours)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут ошибка в формуле
w.Height в см

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

и возможно деление на 0

Comment thread main.go Outdated
func (w Walking) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return InfoMessage{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

то же замечание что и для Running

Comment thread main.go
func (s Swimming) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return InfoMessage{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут как раз все ок - по заданию

Comment thread main.go
func (s Swimming) meanSpeed() float64 {
// вставьте ваш код ниже
...
return float64(s.LengthPool) * float64(s.CountPool) / MInKm / s.Duration.Hours()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут тоже возможно деление на 0

@Testbek
Copy link
Copy Markdown
Owner Author

Testbek commented Feb 7, 2025

dirtymew

Антон, привет. Спасибо Вам за ваш чуткий взгляд, и что помогаете найти дьявола в деталях.

Copy link
Copy Markdown

@dirtymew dirtymew left a comment

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