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

implement hw1 #765

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

Conversation

SlepenkovDmitry
Copy link

Фамилия Имя

Слепенков Дмитрий

Email

[email protected]

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

1

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

https://youtu.be/i-HFvOaUZyg

end

row = PrintPascalTriangle.new
row.printTriangle

Choose a reason for hiding this comment

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

Final newline missing.

end
end
end

Choose a reason for hiding this comment

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

Trailing whitespace detected.


def printTriangle
max = calculatedRow.flatten.max.to_s.length
strings = calculatedRow.map {|arr| arr.map {|int| int.to_s.center(max + 3)} }

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 }.
Line is too long. [81/80]

triangle
end

def printTriangle

Choose a reason for hiding this comment

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

Use snake_case for method names.

end
triangle
end

Choose a reason for hiding this comment

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

Trailing whitespace detected.

triangle = []
@rows.times do |row|
line = [1]
(0..row-1).each {|x| line << (line[x] * (row-x) / (x+1)) }

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

@rows = gets.chomp.to_i
end

def calculatedRow

Choose a reason for hiding this comment

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

Use snake_case for method names.

print "Enter the depth of the triangle n = "
@rows = gets.chomp.to_i
end

Choose a reason for hiding this comment

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

Trailing whitespace detected.

class PrintPascalTriangle
def initialize
print "Enter the depth of the triangle n = "
@rows = gets.chomp.to_i

Choose a reason for hiding this comment

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

Trailing whitespace detected.

@@ -0,0 +1,27 @@
class PrintPascalTriangle
def initialize
print "Enter the depth of the triangle n = "

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.

end
end
row = PrintPascalTriangle.new
row.printTriangle

Choose a reason for hiding this comment

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

unexpected token $end

end

row = PrintPascalTriangle.new
row.printTriangle

Choose a reason for hiding this comment

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

unexpected token $end

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.

ОТСТУПЫ

@Xanderwot
Copy link
Contributor

подозрение в плагиате #766

вот только сложно сказать кто у кого.

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