#!/bin/ruby module Ex25 # This function will break up words for us. # Sorts the words. # Prints the first word after shifting one back. # Prints the last word after popping it off. # Takes in a full sentence and returns the sorted words. # Prints the first and last words of the sentence. # Sorts the words then prints the first and last one. # Break it, pop a couple off the end and add fucker to the end, than return new sentence. # Shift 4 off the beginning, add death and put back together. Return new sentence. # Combines the two end changes above and prints out. puts "Let's practice everyfuckingthing." puts "\n" \tThe lovely world with logic so firmly planted cannot discern \n the needs of love nor comprehend passion from intuition and requires an explanation \n\t\twhere there is none. END puts "--------------" puts poem puts "--------------" puts "\n" five = 10 - 2 + 3 - 6 puts "This should say #{five}." puts "\n" def secret_formula(started) start_point = 10000 puts "start point is: #{start_point}" puts "With a starting point of: #{start_point}" puts "\n" puts "start point is: #{start_point}" puts "\n" puts "Now fer' the other way:" puts "With a starting point of: #{start_point}" puts "\n" sentence = "fuck all good things come to those who wait." puts sentence puts "\n" words = Ex25.break_words(sentence) sorted_words = Ex25.sort_words(words) puts "print first than last:" Ex25.print_first_word(words) Ex25.print_last_word(words) puts "\n" puts "Print first and last sorted:" Ex25.print_first_word(sorted_words) Ex25.print_last_word(sorted_words) sorted_words = Ex25.sort_sentence(sentence) puts "\n" puts "Print first and last:" Ex25.print_first_last(sentence) puts "\n" puts "Print first and last sorted." Ex25.print_first_last_sorted(sentence) puts "\n" puts "pop two off the end and add fucker." Ex25.add_fucker(sentence) puts sentence puts "\n" puts "shift four off the beginning and add death." Ex25.add_death(sentence) puts sentence puts "\n" puts "Print the sentence with both changes."