Conversation
Task 3
Outdated
| @@ -0,0 +1,5 @@ | |||
| class Task3 | |||
There was a problem hiding this comment.
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"] | |||
There was a problem hiding this comment.
task says “script takes”, it means that your script should take this arrays as arguments from STDIN
| @@ -3,4 +3,4 @@ def task | |||
| myArray = ["stuff", "widget", "ruby", "goodies", "java", "emerald", "etc" ] | |||
There was a problem hiding this comment.
this is 7th task, rename please file
There was a problem hiding this comment.
- 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 No newline at end of file | ||
| end |
There was a problem hiding this comment.
if you want to execute this code, you should call method task
| number / other | ||
| end | ||
| end | ||
| calculator = Numbers.new |
There was a problem hiding this comment.
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).
| @@ -3,4 +3,4 @@ def task | |||
| myArray = ["stuff", "widget", "ruby", "goodies", "java", "emerald", "etc" ] | |||
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
This is wrong realization of task. The script should take the NAME OF TEXT FILE and the LINE.
| puts item | ||
| end | ||
| end No newline at end of file | ||
| a = New.new |
There was a problem hiding this comment.
you should create instance outside of class body
No description provided.