Month: February 2017

More testing

Okay this one, was a tough one:   module Ex25 # This function will break up words for me. def Ex25.break_words(stuff) words = stuff.split(' ') return words  end #sorts the words def Ex25.sort_words(words) return words.sort end  #Prints the first word after shifting it off   def Ex25.print_first_word(words) word = words.shift puts word end #Prints the … Continue reading More testing

Functions and Files

input_file = ARGV.first     #the first file name is typed in is input_file   def print_all(f)    #f in this case is a variable but also a file puts end def rewind(f) moves to the start of the file >> to 0 bytes of the file end def print_a_line(line_count, f) … Continue reading Functions and Files