Question

Submit part 0, as a plain text file. Submit parts 1 - 3 as a Ruby...

Submit part 0, as a plain text file. Submit parts 1 - 3 as a Ruby source file.

Part 0

  • The Ruby API

  • Information about Ruby’s regular expressions

  • Information about Ruby’s ranges

Part 1

A method that substitutes part of a string

Part 2

  • Print the string “Hello, world.”

  • For the string “Hello, Ruby,” find the index of the word “Ruby.”

0 0
Add a comment Improve this question Transcribed image text
Answer #1

solution

output

output

Add a comment
Know the answer?
Add Answer to:
Submit part 0, as a plain text file. Submit parts 1 - 3 as a Ruby...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • *JAVA File Input/Output Homework* (4 parts) Part 1 1) Open a TEXT editor program 2) Type...

    *JAVA File Input/Output Homework* (4 parts) Part 1 1) Open a TEXT editor program 2) Type in 50 words, one word per line, all words of the SAME catagory, max chars per word is 8. Example: 50 words of some names in the periodic table, or Flowers, or cars or.... 3) Save the file as myWordFile.txt Part 2 Write a program the reads the myWordFile.txt 1) Create an array of 'strings' called myWordArray 2) Write code that opens the file...

  • Assignment 3: Word Frequencies Prepare a text file that contains text to analyze. It could be...

    Assignment 3: Word Frequencies Prepare a text file that contains text to analyze. It could be song lyrics to your favorite song. With your code, you’ll read from the text file and capture the data into a data structure. Using a data structure, write the code to count the appearance of each unique word in the lyrics. Print out a word frequency list. Example of the word frequency list: 100: frog 94: dog 43: cog 20: bog Advice: You can...

  • I need a c++ code that: 1- Read from a text file using C++ example: mytext.txt...

    I need a c++ code that: 1- Read from a text file using C++ example: mytext.txt 2- a function that adds three letters to each latter in that text file for example, if there is a "hello world" inside the text file the function will make it look like "habcezyeloiulghtoiuy wnfroewqrmnilkitduyt" if you note the first latter h follow with three letters abc the e follow with another three zye .... etc so the function is like hashing function that...

  • QUESTION The ReadFile class opens and reads a text file. The WriteFile class opens and writes...

    QUESTION The ReadFile class opens and reads a text file. The WriteFile class opens and writes to a file. Compile and run these programs. There are several ways to read/write text files. The examples shown here are just one way of achieving this. Look at the API for the BufferedReader class. The readline() method is a simple way to read the text file line by line. It returns null when the end of the file has been reached. https://docs.oracle.com/javase/8/docs/api/java/io/BufferedReader.html Look...

  • To insure that file output is written to the disk you need to execute what method?...

    To insure that file output is written to the disk you need to execute what method? a. commit() b. write() c. close() d. complete() The following is called the ________ of a function. def myFunction(x,y) : a. header b. footer c. sentinel d. index True or False: A commonly used program that uses regular expressions is grep. True or False: In Python exception handling provides a mechanism for passing control from the point of the error detection to a handler...

  • Project #6 Perl This assignment has two parts. Each part must be done using Perl Part...

    Project #6 Perl This assignment has two parts. Each part must be done using Perl Part A find.pl Create the script find.pl which searches for files in a directory list based on a regular expression pattern . If the file name matches, print that file name If the file name doesn't match, it should look for instances of the regular expression within the text of the file. If found, it should print the filename, a colon, and the text for...

  • Hello, I can't upload a text file. So, Here is textFileTwo.txt ------------------------------------------------------------------------------------------------ Closed captioning and subtitling...

    Hello, I can't upload a text file. So, Here is textFileTwo.txt ------------------------------------------------------------------------------------------------ Closed captioning and subtitling are both processes of displaying text on a television, video screen, or other visual display to provide additional or interpretive information. Both are typically used as a transcription of the audio portion of a program as it occurs, sometimes including descriptions of non-speech elements. Other uses have been to provide a textual alternative language translation of a presentation's primary audio language that is usually...

  • estion 3 1. Suppose the file mystery.txt contains the text below: The whole thing starts about...

    estion 3 1. Suppose the file mystery.txt contains the text below: The whole thing starts about twelve, fourteen or seventeen. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { string word; int i = 0; ifstream read("mystery.txt"); while(!read.eof()) { read>>word; if(i < word.length()) cout<<word[i]; i++; } cout<< endl; 3 seventeen Thirteen fourteen twelve A Moving to the next question prevents changes to this answer. 29

  • 1. Suppose the file mystery.txt contains the text below: The whole thing starts about twelve, fourteen...

    1. Suppose the file mystery.txt contains the text below: The whole thing starts about twelve, fourteen or seventeen. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { string word; int i 0; ifstream read("mystery.txt"); while(!read.eof()) { read>>word; if(i < word. length()) cout<<word[i]; i++; } cout<< endl; } seventeen teen

  • CSC110 Lab 6 (ALL CODING IN JAVA) Problem: A text file contains a paragraph. You are to read the contents of the file, store the UNIQUEwords and count the occurrences of each unique word. When the fil...

    CSC110 Lab 6 (ALL CODING IN JAVA) Problem: A text file contains a paragraph. You are to read the contents of the file, store the UNIQUEwords and count the occurrences of each unique word. When the file is completely read, write the words and the number of occurrences to a text file. The output should be the words in ALPHABETICAL order along with the number of times they occur and the number of syllables. Then write the following statistics to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT