ruby problems

Anonymous
timer Asked: Nov 8th, 2016

Question description

hello

RUBY Problems 1. write a ruby program that extracts comments from a program and puts them into a separate file. Use as input ANY reasonable� program you have written in the past in any language (Lisp included). By reasonable I mean use a real program with comments � Not something like "hello world" with no comments. The intent is to have To read and process source code looking for specific things such as comments. 2. write a ruby program that removes html from a webpage (instructions delimited by brackets ). Just output the page without the embedded html. Use the class webpage as input or any other page you wish. 3. Write a ruby program that creates a frequency distribution of 'words' in a document and then prints them out from highest to lowest frequency. Select any document yourself- make sure it's text! 4. write a ruby program that determines the 5 oldest files if given a directory listing. Use your own directory listing as input. 5. Write a recursive function that given a string, writes it backwards. 6. How many tertiary sequences of length n have an even number of 0's? 7. How many binary sequences of length n have an even number of 0's? 5. Given this recursive definition: comb(r,k) = comb(r-1,k-1) + comb(r-1,k) = 1 if k = 0 = 0 if k > r implement this in Ruby

Tutor Answer

(Top Tutor) Studypool Tutor
School: Purdue University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors