Skip to content

Conversation

@Testbek
Copy link
Owner

@Testbek Testbek commented Feb 6, 2025

No description provided.

Copy link

@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.

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

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

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

Choose a reason for hiding this comment

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

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

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

Choose a reason for hiding this comment

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

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

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

Choose a reason for hiding this comment

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

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

Copy link

Choose a reason for hiding this comment

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

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

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

Choose a reason for hiding this comment

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

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

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

Choose a reason for hiding this comment

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

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

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

Choose a reason for hiding this comment

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

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

@Testbek
Copy link
Owner Author

Testbek commented Feb 7, 2025

dirtymew

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

Copy link

@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.

3 participants