-
Notifications
You must be signed in to change notification settings - Fork 165
homework - 1 #769
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
base: master
Are you sure you want to change the base?
homework - 1 #769
Conversation
| end | ||
| array[0] = base_number | ||
| for j in 1..depth | ||
| (1..j).reverse_each do |i| |
There was a problem hiding this comment.
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.
2018/JuliaPritychenko/pascal.rb
Outdated
| array[i] = 0 | ||
| end | ||
| array[0] = base_number | ||
| for j in 1..depth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer each over for.
2018/JuliaPritychenko/pascal.rb
Outdated
| print "Enter basic number: " | ||
| base_number = gets.to_i | ||
| array = [] | ||
| for i in 1..depth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer each over for.
2018/JuliaPritychenko/pascal.rb
Outdated
| @@ -0,0 +1,16 @@ | |||
| print "Enter depth: " | |||
| depth = gets.to_i | |||
| print "Enter basic number: " | |||
There was a problem hiding this comment.
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.
2018/JuliaPritychenko/pascal.rb
Outdated
| @@ -0,0 +1,16 @@ | |||
| print "Enter depth: " | |||
There was a problem hiding this comment.
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.
2018/JuliaPritychenko/pascal.rb
Outdated
| array[i] = array[i - 1] + array[i] | ||
| end | ||
| puts | ||
| end No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final newline missing.
2018/JuliaPritychenko/pascal.rb
Outdated
| end | ||
| puts | ||
| end | ||
|
|
There was a problem hiding this comment.
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.
Xanderwot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Верни то, что удалено.
Фамилия Имя
Притыченко Юлия
Email
juliasnoww@mail.ru
Номер домашнего задания
1
Ссылка на видео с демо работы
https://www.youtube.com/watch?v=CroOC2aGbVg&feature=youtu.be
Комментарии
Хотел сделать красоту, но не знаю как.