Assessment Instructions Attached Files: lorem.txt(1.521 KB) example output.png(48.23 KB) Write a Ruby script to read the text file (lorem.txt) to count the number of vowels (a, e, i, o, u), and...

1 answer below »

Assessment Instructions

Attached Files:

  1. Write a Ruby script to read the text file (lorem.txt) to count the number of vowels (a, e, i, o, u), and produce a bar chart that would look similar to Figure 1 (see below).

    1. Start this task by first downloading the lorem.txt file. You do not need to download using your code. Simply use your web browser to download the file in the VM and place it in the desired location.

    2. Now using your Ruby script, you need to read this file.

    3. Process the contents of the file by checking the counts of each vowel in the file.

    4. The bar chart you generate should be based on the count of vowels.



  2. You are required to use two separate functions to count the vowels and to produce the bar chart.

    1. You must have a separate function for counting the vowels.

    2. And a separate function for producing the bar chart.



  3. The vowels counted should NOT be case-sensitive.

    1. You can ignore the case of the vowels when counting. Lower-case “a” and upper-case “A” should both be counted as just “a”. For example, “Amoeba” has a total of 2 a, 1 o, 1 e as counts of vowels.



  4. The bar chart produced must be text-based, and output to STDOUT.

    1. Output the bar chart to the terminal/command prompt ONLY.



  5. You are NOT required to use any graphics-based functions for this question.




Submission Instructions


Submit as a single compressed file in ZIP format.


Your ZIP files should contain the following



  1. Your script file.

  2. The portfolio evidence including required screenshots. You must use thePortfolio Evidence Templateprovided.




Answered Same DayApr 02, 2021

Answer To: Assessment Instructions Attached Files: lorem.txt(1.521 KB) example output.png(48.23 KB) Write a...

Abr Writing answered on Apr 03 2021
149 Votes
evidence.docx
Advanced Scripting Languages: Portfolio Evidence
        Student ID
        
        Student Name
    
    
        Assessment
        
1 Initial Run
· Provide evidence of running the script for execution.
This is the initial run of the script hist.rb
2 Execution
· Provide evidence of tasks performed during execution if any, e.g. getting user input if any, or prompts created during execution.
· You may include as much as screenshots as required OR none if not required.
N/A
3 Output
· Provide evidence of out generated at the...
SOLUTION.PDF

Answer To This Question Is Available To Download

Submit New Assignment

Copy and Paste Your Assignment Here