-
Notifications
You must be signed in to change notification settings - Fork 167
\(*_*)/ #764
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?
\(*_*)/ #764
Conversation
result.push(special_text_and_extra_parameter) | ||
end | ||
calculate_operations(result, element) | ||
when "!" |
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.
case element | ||
when /\d/ | ||
result.push(element.to_f) | ||
when "-", "/", "*", "+" |
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.
result = result.reverse | ||
integer_res = Integer("0b" + result) | ||
end | ||
def main |
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.
Use empty lines between method definitions.
end | ||
end | ||
result = result.reverse | ||
integer_res = Integer("0b" + result) |
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.
Useless assignment to variable - integer_res.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
string_counter += 1 | ||
else | ||
result[string_counter] = i | ||
string_counter += 1 |
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.
Inconsistent indentation detected.
Move string_counter += 1 out of the conditional.
case temp | ||
when /\d/ | ||
operands_count += 1 | ||
when "-", "/", "*", "+", "!" |
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.
rpn_form.push(temp) | ||
end | ||
def make_rpn_input(operands_count = 0, operators_count = 0, rpn_form = []) | ||
while ((operands_count - operators_count != 1) || (operands_count == 1)) |
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.
Don't use parentheses around the condition of a while.
def push_to_rpn_form(rpn_form, temp ) | ||
rpn_form.push(temp) | ||
end | ||
def make_rpn_input(operands_count = 0, operators_count = 0, rpn_form = []) |
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.
Use empty lines between method definitions.
puts "Please, input one more operand for you RPN expression" | ||
temp_parameter = gets.chomp.to_f | ||
end | ||
def push_to_rpn_form(rpn_form, temp ) |
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.
Use empty lines between method definitions.
Space inside parentheses detected.
puts main | ||
def special_text_and_extra_parameter | ||
puts "Please, input one more operand for you RPN expression" | ||
temp_parameter = gets.chomp.to_f |
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.
Useless assignment to variable - temp_parameter.
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.
Верни пожалуйста все обратно, прям очень плохой PR.
Ты удалила прям очень много того, что не принадлежит тебе.
ну и читать это все сложно, пока не поправишь.
Фамилия Имя
Притыченко Юлия
Email
juliasnoww@mail.ru
Номер домашнего задания
1
Ссылка на видео с демо работы
https://www.youtube.com/watch?v=CroOC2aGbVg&feature=youtu.be
Комментарии
Хотела сделать красоту, но не знаю как.