Conversation
| n = gets.chomp.to_i | ||
|
|
||
| pascal(n) | ||
|
|
| k+=1} | ||
| p tree} | ||
| end | ||
| print "Введите глубину дерева: " |
There was a problem hiding this comment.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| base=base*(r-k+1)/k | ||
| tree.push base | ||
| k+=1} | ||
| p tree} |
There was a problem hiding this comment.
Expression at 17, 11 should be on its own line.
| (0..r-1).step(1){|index| | ||
| base=base*(r-k+1)/k | ||
| tree.push base | ||
| k+=1} |
There was a problem hiding this comment.
Surrounding space missing for operator +=.
Expression at 16, 11 should be on its own line.
| base=f | ||
| k=1 | ||
| (0..r-1).step(1){|index| | ||
| base=base*(r-k+1)/k |
There was a problem hiding this comment.
Surrounding space missing for operator =.
Surrounding space missing for operator *.
Surrounding space missing for operator -.
Surrounding space missing for operator +.
Surrounding space missing for operator /.
| # My Homework | ||
|
|
||
| def pascal(n) | ||
|
|
There was a problem hiding this comment.
Extra empty line detected at method body beginning.
| k+=1} | ||
| p tree} | ||
| end | ||
| print "Введите глубину дерева: " |
There was a problem hiding this comment.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| term=term*(r-k+1)/k | ||
| tree.push term | ||
| k+=1} | ||
| p tree} |
There was a problem hiding this comment.
Expression at 13, 11 should be on its own line.
| (0..r-1).step(1){|index| | ||
| term=term*(r-k+1)/k | ||
| tree.push term | ||
| k+=1} |
There was a problem hiding this comment.
Surrounding space missing for operator +=.
Expression at 12, 11 should be on its own line.
| term=1 | ||
| k=1 | ||
| (0..r-1).step(1){|index| | ||
| term=term*(r-k+1)/k |
There was a problem hiding this comment.
Surrounding space missing for operator =.
Surrounding space missing for operator *.
Surrounding space missing for operator -.
Surrounding space missing for operator +.
Surrounding space missing for operator /.
| n = gets.chomp.to_i | ||
|
|
||
| pascal(n) | ||
|
|
| k+=1} | ||
| p tree} | ||
| end | ||
| print "Введите глубину дерева: " |
There was a problem hiding this comment.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| base=base*(r-k+1)/k | ||
| tree.push base | ||
| k+=1} | ||
| p tree} |
There was a problem hiding this comment.
Expression at 17, 11 should be on its own line.
| (0..r-1).step(1){|index| | ||
| base=base*(r-k+1)/k | ||
| tree.push base | ||
| k+=1} |
There was a problem hiding this comment.
Surrounding space missing for operator +=.
Expression at 16, 11 should be on its own line.
| base=f | ||
| k=1 | ||
| (0..r-1).step(1){|index| | ||
| base=base*(r-k+1)/k |
There was a problem hiding this comment.
Surrounding space missing for operator =.
Surrounding space missing for operator *.
Surrounding space missing for operator -.
Surrounding space missing for operator +.
Surrounding space missing for operator /.
| # My Homework | ||
|
|
||
| def pascal(n) | ||
|
|
There was a problem hiding this comment.
Extra empty line detected at method body beginning.
| k+=1} | ||
| p tree} | ||
| end | ||
| print "Введите глубину дерева: " |
There was a problem hiding this comment.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
| term=term*(r-k+1)/k | ||
| tree.push term | ||
| k+=1} | ||
| p tree} |
There was a problem hiding this comment.
Expression at 13, 11 should be on its own line.
| (0..r-1).step(1){|index| | ||
| term=term*(r-k+1)/k | ||
| tree.push term | ||
| k+=1} |
There was a problem hiding this comment.
Surrounding space missing for operator +=.
Expression at 12, 11 should be on its own line.
| term=1 | ||
| k=1 | ||
| (0..r-1).step(1){|index| | ||
| term=term*(r-k+1)/k |
There was a problem hiding this comment.
Surrounding space missing for operator =.
Surrounding space missing for operator *.
Surrounding space missing for operator -.
Surrounding space missing for operator +.
Surrounding space missing for operator /.
| print 'Введите глубину дерева: ' | ||
| n = gets.chomp.to_i | ||
| pascal(n) | ||
|
|
| base = base * ( r - k + 1 ) / k | ||
| tree.push base | ||
| k += 1} | ||
| p tree} |
There was a problem hiding this comment.
Inconsistent indentation detected.
Expression at 14, 9 should be on its own line.
| (0..r - 1).step(1){|index| | ||
| base = base * ( r - k + 1 ) / k | ||
| tree.push base | ||
| k += 1} |
There was a problem hiding this comment.
Inconsistent indentation detected.
Expression at 13, 13 should be on its own line.
| k = 1 | ||
| (0..r - 1).step(1){|index| | ||
| base = base * ( r - k + 1 ) / k | ||
| tree.push base |
There was a problem hiding this comment.
Inconsistent indentation detected.
| base = f | ||
| k = 1 | ||
| (0..r - 1).step(1){|index| | ||
| base = base * ( r - k + 1 ) / k |
There was a problem hiding this comment.
Space inside parentheses detected.
| tree = [h] | ||
| base = f | ||
| k = 1 | ||
| (0..r - 1).step(1){|index| |
There was a problem hiding this comment.
Inconsistent indentation detected.
Space missing to the left of {.
Space between { and | missing.
Avoid using {...} for multi-line blocks.
Unused block argument - index. You can omit the argument if you don't care about it.
| (0..n).each{|r| | ||
| tree = [h] | ||
| base = f | ||
| k = 1 |
There was a problem hiding this comment.
Inconsistent indentation detected.
| print 'Введите базовый номер: ' | ||
| f = gets.chomp.to_i | ||
| h = f | ||
| (0..n).each{|r| |
There was a problem hiding this comment.
Inconsistent indentation detected.
Space missing to the left of {.
Space between { and | missing.
Avoid using {...} for multi-line blocks.
| @@ -0,0 +1,19 @@ | |||
| # My Homework | |||
| def pascal(n) | |||
| print 'Введите базовый номер: ' | |||
There was a problem hiding this comment.
Use 2 (not 0) spaces for indentation.
| @@ -0,0 +1,18 @@ | |||
| # My Homework | |||
| def pascal(n) | |||
There was a problem hiding this comment.
Indentation of first line in file detected.
| @@ -0,0 +1,18 @@ | |||
| # My Homework | |||
There was a problem hiding this comment.
Incorrect indentation detected (column 0 instead of 2).
| base = base * ( r - k + 1 ) / k | ||
| tree.push base | ||
| k += 1} | ||
| p tree} |
There was a problem hiding this comment.
Inconsistent indentation detected.
Expression at 14, 11 should be on its own line.
| (0..r - 1).step(1) { |index| | ||
| base = base * ( r - k + 1 ) / k | ||
| tree.push base | ||
| k += 1} |
There was a problem hiding this comment.
Inconsistent indentation detected.
Expression at 13, 15 should be on its own line.
| (0..r - 1).step(1) { |index| | ||
| base = base * ( r - k + 1 ) / k | ||
| tree.push base | ||
| k += 1} |
There was a problem hiding this comment.
Inconsistent indentation detected.
Expression at 12, 15 should be on its own line.
| base = f | ||
| k = 1 | ||
| (0..r - 1).step(1) { |index| | ||
| base = base * ( r - k + 1 ) / k |
There was a problem hiding this comment.
Space inside parentheses detected.
| tree = [h] | ||
| base = f | ||
| k = 1 | ||
| (0..r - 1).step(1) { |index| |
There was a problem hiding this comment.
Inconsistent indentation detected.
Avoid using {...} for multi-line blocks.
Unused block argument - index. You can omit the argument if you don't care about it.
| print 'Введите базовый номер: ' | ||
| f = gets.chomp.to_i | ||
| h = f | ||
| (0..n).each { |r| |
There was a problem hiding this comment.
Inconsistent indentation detected.
Avoid using {...} for multi-line blocks.
| @@ -0,0 +1,17 @@ | |||
| def pascal(n) | |||
There was a problem hiding this comment.
Indentation of first line in file detected.
| (0..r - 1).step(1) { |index| | ||
| base = base * ( r - k + 1 ) / k | ||
| tree.push base | ||
| k += 1} |
There was a problem hiding this comment.
Inconsistent indentation detected.
Expression at 12, 13 should be on its own line.
Xanderwot
left a comment
There was a problem hiding this comment.
имена переменных в основном
| print 'Введите базовый номер: ' | ||
| f = gets.chomp.to_i | ||
| h = f | ||
| (0..n).each { |r| |
| print 'Введите базовый номер: ' | ||
| f = gets.chomp.to_i | ||
| h = f | ||
| (0..n).each { |r| |
There was a problem hiding this comment.
используй do end вместо { } для многострочных блоков.
| @@ -0,0 +1,17 @@ | |||
| def pascal(n) | |||
| print 'Введите базовый номер: ' | |||
| f = gets.chomp.to_i | |||
There was a problem hiding this comment.
имена переменных прям очень плохие
| tree = [h] | ||
| base = f | ||
| k = 1 | ||
| (0..r - 1).step(1) { |index| |
Фамилия Имя
Юрий кравченко
Email
yurezz08@mail.ru
Номер домашнего задания
1
Ссылка на видео с демо работы
https://youtu.be/lMHluMMwtOI
Комментарии
3 уровень сделать пока не получилось