Skip to content
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

homework - 1 #769

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

homework - 1 #769

wants to merge 4 commits into from

Conversation

juliaSnoww
Copy link

Фамилия Имя

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

Email

[email protected]

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

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

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