Skip to content

hw 1#766

Open
552687773 wants to merge 6 commits into
rubyroidlabs:masterfrom
552687773:homework-1
Open

hw 1#766
552687773 wants to merge 6 commits into
rubyroidlabs:masterfrom
552687773:homework-1

Conversation

@552687773
Copy link
Copy Markdown

Фамилия Имя

Дмитрий Шкуратов

Email

dimka552687773@gmail.com

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

1

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

https://youtu.be/-stl_LHE4-k

Комментарии

nothing

Comment thread 2018/DmitryShkuratov/1/homework-1.rb Outdated
strings.each do |line|
puts line.join.center(strings[-1].join.length)
end
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

end at 23, 3 is not aligned with def at 17, 2.

max = to_pascal.flatten.max.to_s.length
strings = to_pascal.map {|arr| arr.map {|int| int.to_s.center(max + 3)} }
strings.each do |line|
puts line.join.center(strings[-1].join.length)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use 2 (not 0) spaces for indentation.

Comment thread 2018/DmitryShkuratov/1/homework-1.rb Outdated

def print_triangle
max = to_pascal.flatten.max.to_s.length
strings = to_pascal.map {|arr| arr.map {|int| int.to_s.center(max + 3)} }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Space between { and | missing.
Space missing inside }.

temp << line
end
temp
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

end at 15, 0 is not aligned with def at 7, 2.

Comment thread 2018/DmitryShkuratov/1/homework-1.rb Outdated
(0..row-1).each {|x| line << (line[x] * (row-x) / (x+1)) }
temp << line
end
temp
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent indentation detected.

line = [1]
(0..row-1).each {|x| line << (line[x] * (row-x) / (x+1)) }
temp << line
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

end at 13, 2 is not aligned with @rows.times do |row| at 9, 4.

Comment thread 2018/DmitryShkuratov/1/homework-1.rb Outdated
temp = []
@rows.times do |row|
line = [1]
(0..row-1).each {|x| line << (line[x] * (row-x) / (x+1)) }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Surrounding space missing for operator -.
Space between { and | missing.
Surrounding space missing for operator +.

strings.each do |line|
puts line.join.center(strings[-1].join.length)
end
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

end at 24, 0 is not aligned with def at 18, 2.

max = to_pascal.flatten.max.to_s.length
strings = to_pascal.map { |arr| arr.map { |int| int.to_s.center(max + 3)} }
strings.each do |line|
puts line.join.center(strings[-1].join.length)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use 2 (not 0) spaces for indentation.


def print_triangle
max = to_pascal.flatten.max.to_s.length
strings = to_pascal.map { |arr| arr.map { |int| int.to_s.center(max + 3)} }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Space missing inside }.

temp
end

def print_triangle
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent indentation detected.

Comment thread 2018/DmitryShkuratov/1/homework-1.rb Outdated
end
end
temp
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

end at 16, 2 is not aligned with class at 1, 0.

Comment thread 2018/DmitryShkuratov/1/homework-1.rb Outdated
def to_pascal
temp = []
@rows.times do |row|
line = [1]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use 2 (not 0) spaces for indentation.

strings = to_pascal.map { |arr| arr.map { |int| int.to_s.center(max + 3)} }
strings.each do |line|
puts line.join.center(strings[-1].join.length)
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

end at 23, 2 is not aligned with strings.each do |line| at 21, 4.

temp << line
end
end
temp
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent indentation detected.

@Xanderwot Xanderwot mentioned this pull request Mar 11, 2018
Copy link
Copy Markdown
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