Skip to content

Conversation

@juliaSnoww
Copy link

Фамилия Имя

Притыченко Юлия

Email

juliasnoww@mail.ru

Номер домашнего задания

1

Ссылка на видео с демо работы

https://www.youtube.com/watch?v=CroOC2aGbVg&feature=youtu.be

Комментарии

Хотел сделать красоту, но не знаю как.

end
array[0] = base_number
for j in 1..depth
(1..j).reverse_each do |i|

Choose a reason for hiding this comment

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

Shadowing outer local variable - i.

array[i] = 0
end
array[0] = base_number
for j in 1..depth

Choose a reason for hiding this comment

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

Prefer each over for.

print "Enter basic number: "
base_number = gets.to_i
array = []
for i in 1..depth

Choose a reason for hiding this comment

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

Prefer each over for.

@@ -0,0 +1,16 @@
print "Enter depth: "
depth = gets.to_i
print "Enter basic number: "

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -0,0 +1,16 @@
print "Enter depth: "

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

array[i] = array[i - 1] + array[i]
end
puts
end No newline at end of file

Choose a reason for hiding this comment

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

Final newline missing.

end
puts
end

Choose a reason for hiding this comment

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

1 trailing blank lines detected.

Copy link
Contributor

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