Skip to content

add code#1

Open
MrRad-Ivan wants to merge 1 commit intomainfrom
first-iteration
Open

add code#1
MrRad-Ivan wants to merge 1 commit intomainfrom
first-iteration

Conversation

@MrRad-Ivan
Copy link
Copy Markdown
Owner

Написал код, выглядит правдоподобно

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
// Это переопределенный метод Calories() из Training.
func (r Running) Calories() float64 {
return (CaloriesMeanSpeedMultiplier*r.meanSpeed() + CaloriesMeanSpeedShift) * r.Weight / MInKm * r.Duration.Hours() * MinInHours
//return ((CaloriesMeanSpeedMultiplier*r.Training.meanSpeed() + CaloriesMeanSpeedShift) * r.Weight / CmInM * r.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.

убрать лишние комметарии

Comment thread main.go
// вставьте ваш код ниже
...
SpeadMs := math.Pow((w.Training.meanSpeed() * KmHInMsec), 2) // перевод км/ч в м/с и возведение в квадрат
heightMetr := w.Height / CmInM // рост в метрах
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
func (t Training) meanSpeed() float64 {
// вставьте ваш код ниже
...

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
// вставьте ваш код ниже
...

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.

лишние скобки

Comment thread main.go
func (s Swimming) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return s.Training.TrainingInfo()
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 (w Walking) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return w.Training.TrainingInfo()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут все оk

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