Skip to content

Conversation

@MatviienkoOleh
Copy link
Owner

No description provided.

Task 3 Outdated
@@ -0,0 +1,5 @@
class Task3
Copy link
Collaborator

Choose a reason for hiding this comment

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

You wrap your code in class, but you don't use Task3 object at all. You can place that code inside class method and then call it in the end of this file. Or you can simply remove class construction, it is okay for this task.

Task 3 Outdated
@@ -0,0 +1,5 @@
class Task3
array1 = ["apple", "onion", "orange"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

task says “script takes”, it means that your script should take this arrays as arguments from STDIN

@@ -1,6 +1,6 @@
class New
def task
myArray = ["stuff", "widget", "ruby", "goodies", "java", "emerald", "etc" ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is 7th task, rename please file

Copy link
Collaborator

Choose a reason for hiding this comment

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

  • You changed name of this file, but please add comment here that you made modifications
  • Move all files to one directory called "Ruby Basic" or something like that

item = myArray[rand(myArray.length)]
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

if you want to execute this code, you should call method task

number / other
end
end
calculator = Numbers.new
Copy link
Collaborator

Choose a reason for hiding this comment

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

In example to task 6 you can see next Input example: ruby yourscript.rb 5 10 sum. So you need to give argument to this script (two numbers and operation name).

@@ -1,6 +1,6 @@
class New
def task
myArray = ["stuff", "widget", "ruby", "goodies", "java", "emerald", "etc" ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

this script must take arguments from outside (ARGV), so you should give these argument when you call this script

@@ -0,0 +1,6 @@
class Home
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is wrong realization of task. The script should take the NAME OF TEXT FILE and the LINE.

puts item
end
end
a = New.new
Copy link
Collaborator

Choose a reason for hiding this comment

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

you should create instance outside of class body

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