Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

Unscramble permuted words by generating all permutations…

Customer Question
Unscramble permuted words by...

Unscramble permuted words by generating all permutations of Jumble string and searching for word in Unix dictionary. It is due no later than Friday. It requires the programming language of Ruby on Rails, the output must be viewed in the command prompt, and the files should be saved as a rb file. There is a txt file for section three.  http://wikisend.com/download/842018/dict.txt. There is three parts to this HW.


http://wikisend.com/download/278714/hw.docx



1. Write a user defined function named to_array that converts a String object to an array like this:




        s = "dog" a = to_array(s)

        print a, "\n"









            • Output: ["d", "o", "g"]







2. Write a method called get_permulations that inputs an array of single characters (like ["d", "o", "g"]).  The  method should return an array of all permutations of the Jumble string. The permutations in the array should be in string format.




      a = ["d", "o", "g"] perms = get_permutations(a)




      print perms, "\n"





        Output: ["dog", "dgo", "odg", "ogd", "gdo", "god"]






3. Compare the words in the Unix dictionary to the permutation strings in the array. Print any matches that are found. Here is some that might help:





        Define to_array method (Item 1).

        Define get_permutations method (Item 2).






        # ***** main script.

        # ***** in a comment the Jumble strings you

        # ***** for testing. Include at least two test strings.






        Input Jumble string from keyboard. (Be sure to remove "\n" from end of input.)






        Obtain array of letters from Jumble string using to_array method (Item 1).






        Obtain array of permutations from array using get_permutations method (Item 2).






        Open Unix dictionary file to create file object fin.






        while more lines in dictionary file get line






          Get word from line of dictionary file.

          if word starts with a lower case letter

            for each permutation in array called perm

              if perm is equal to word

                 print word

                 exit script

              end

           end

          end



endClose file object fin.


 

 pseudocode section 3

 

Submitted: 3 years ago.Category: Homework
Show More
Show Less
Ask Your Own Homework Question
Answered in 16 hours by:
5/19/2015
Tutor: Ingo U, Software Engineer replied 3 years ago
Ingo U
Ingo U, Software Engineer
Category: Homework
Satisfied Customers: 796
Experience: Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Verified

HI, I will have a look at this. I got the hw doc and dict.txt, anything else I'll need?

What version of Ruby?

Ask Your Own Homework Question
Customer reply replied 3 years ago
Ruby on Rails. 2.2. That's the latest version I've downloaded on my laptop.
Tutor: Ingo U, Software Engineer replied 3 years ago
Thanks - here are your files:
Parts 1#2:
https://www.dropbox.com/s/o4fj0k0144wp2i8/jumble_1_2.rb?dl=0
Part 3:
https://www.dropbox.com/s/biq25rolmrw1h5h/jumble_3.rb?dl=0
Make sure the dict.txt file is in the same directory.
Please let me know if you need anything else!
Regards,
Ingo
Ask Your Own Homework Question
Customer reply replied 3 years ago

Is it possible to include test strings included in a comment and source code comments for what each particular section does? They don't have to be detailed just a brief sentence or comment.

Tutor: Ingo U, Software Engineer replied 3 years ago
OK, updated files are in the same place:
https://www.dropbox.com/s/o4fj0k0144wp2i8/jumble_1_2.rb?dl=0
https://www.dropbox.com/s/biq25rolmrw1h5h/jumble_3.rb?dl=0
Hope that helps!
Ask Your Own Homework Question
Customer reply replied 3 years ago
Number 3 retrieves three words, can you possibly have it retrieve only one word. The classes in that document are a bit too advanced at this point in my class.
Tutor: Ingo U, Software Engineer replied 3 years ago
Do you mean only ask the user for 1 word to test, or only look for one match per test word in the dictionary?
Ask Your Own Homework Question
Customer reply replied 3 years ago
To ask the user 1 word to tes and have it output one result.
Tutor: Ingo U, Software Engineer replied 3 years ago
This answer is protected
Would you like to ask this question?
If you've already paid for this answer, simply Login.
Customer reply replied 3 years ago
It's supposed to unscramble the words being entered. For example, if you type in tac it should print cat.
Tutor: Ingo U, Software Engineer replied 3 years ago
That's what I had before! Then you said one word to test and only one result. So now it only prints the first word found in the dictionary. well if you enter tac, it finds "act" before "cat".
So I took out the line "return" that makes it quit after finding a dictionary word. Now it prints "act" and "cat".
https://www.dropbox.com/s/biq25rolmrw1h5h/jumble_3.rb?dl=0
Ask Your Own Homework Question
Tutor: Ingo U, Software Engineer replied 3 years ago
Hi,
just following up, were you able to use my solution?
Please feel free to post any additional questions, comments or concerns you may have regarding this issue.
If you're not yet satisfied with the result, please let me know what is missing.
I will do my best to make it right for you.
Otherwise, please don't forget to rate my service - I don't get paid for my work until your rating is received.
Regards,
Ingo U
Ask Your Own Homework Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a tutorLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask Ingo U Your Own Question
Ingo U
Ingo U
Ingo U, Software Engineer
Category: Homework
Satisfied Customers: 796
796 Satisfied Customers
Experience: Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL

Ingo U is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

5,867 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,556 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,698 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,190 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
For LogicPro only Purpose: Use a Priority_queue to simulate
For LogicPro onlyPurpose: Use a Priority_queue to simulate a Binary_TreeTechniques/Structures: Polymorphism, SmartPointers, Priority_Queue, LambdasStep1: Create a frequency table of ascii characters b… read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,867 satisfied customers
1. If a 2:1 transformer has a 220 VAC input, a voltage test
1. If a 2:1 transformer has a 220 VAC input, a voltage test at the primary winding should produce a meter reading of A. 0 VAC. B. 110 VAC. C. 220 VAC. D. 440 VAC. 2. A circuit contains four 100 Ω resi… read more
Sandhya_sharma
Sandhya_sharma
Master\u0027s Degree
560 satisfied customers
I need this Project Answer by 6:00 pm today June 19 2018,
I need this Project Answer by 6:00 pm today June 19 2018, and I would like to be notified if a writer would take the question. If Writer Grace is available I would like her if not anyone can take it.U… read more
GLENN GILONGOS
GLENN GILONGOS
Master of Mathematics
416 satisfied customers
I need answers for my associates accounting exams,
Hi JA: Hello. How can I help? Customer: I need answers for my associates accounting exams JA: The Tutor can help you get an A on your homework or ace your next test. Tell me more about what you need h… read more
Manal Elkhoshkhany
Manal Elkhoshkhany
Tutor
4,556 satisfied customers
What is the answer? Nonparametric statistics requires a
What is the answer ? Nonparametric statistics requires a larger sample size because of ? a. Sensivity B.range of scores C.variance D.power… read more
GLENN GILONGOS
GLENN GILONGOS
Master of Mathematics
416 satisfied customers
I have a requirement to write an Oracle PL/SQL code to
I have a requirement to write an Oracle PL/SQL code to delete about 9 billion records in small batches of 10,000. The procedure should run quasi permanently (loop/sleep) and must backup (log/copy) the… read more
Bruce Wilner
Bruce Wilner
Master of Engineering
29 satisfied customers
I need help creating an excel formula (i'm assuming an IF or
I need help creating an excel formula (i'm assuming an IF or SUM IF) where certain pick list values need to be selected across columns B-N of my sheet in order to return a YES, NO, or TBD answer in co… read more
The-PC-Guy
The-PC-Guy
Bachelor\u0027s Degree
630 satisfied customers
I have a written code for C++ for the lottery. I have I
Hello, I have a written code for C++ for the lottery … read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,867 satisfied customers
Random and independent samples of 85 recent prime time
Random and independent samples of 85recent prime time airings from each of two major networks have been considered. The first network aired a mean of 110.7commercials during prime time, with a standar… read more
Sandhya_sharma
Sandhya_sharma
Master\u0027s Degree
560 satisfied customers
This question in only for Teacher Keys! Could you please
This question in only for Sarah TeacherKeysHi, Sarah! Could you please help me find the blank models for the two keys I'm going to indicate ? Photos are attachedThe squared key says 1c arrow. If you h… read more
Sarah
Sarah
Teacher
Master\u0027s Degree
19 satisfied customers
I need help with my Marketing course but I do not see
I need help with my Marketing course but I do not see Marketing in the Category below. It is due by May 12, 2018. Only need to answer 20 questions with the appropriate answer… read more
Carter McBride
Carter McBride
LLM
1,150 satisfied customers
I have three children that complete Kumon like worksheets
I have three children that complete Kumon like worksheets daily. We live too far from a tutoring center and this is our solution. I am basically looking for a tudor to check their daily worksheets, ma… read more
Sandhya_sharma
Sandhya_sharma
Master\u0027s Degree
560 satisfied customers
Need help with American Government. I am taking this class
JA: The Tutor can help you get an A on your homework or ace your next test. Tell me more about what you need help with so we can help you best. Customer: Need help with American Government JA: Is ther… read more
judybailey61
judybailey61
Bachelors degree
196 satisfied customers
I will have Us history exam today at 2pm Los Angeles time 50
Hello I will have Us history exam today at 2pm Los Angeles time 50 multiple questions … read more
Susan Markel
Susan Markel
4th Grade Teacher
Bachelor\u0027s Degree
5 satisfied customers
I need help with a paper. I need help with counter
I need help with a paper JA: The Tutor can help you get an A on your homework or ace your next test. Tell me more about what you need help with so we can help you best. Customer: I need help with coun… read more
GLENN GILONGOS
GLENN GILONGOS
Master of Mathematics
416 satisfied customers
Logic Pro Only Create a Ruby program that duplicates the
Logic Pro Only Create a Ruby program that duplicates the Java example NameSorter.java. It is assumed that your program can be run like this: ruby NameSorter.rb The correct output is included in the Ja… read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,867 satisfied customers
Writing a summary of how my experience as an assistant
Writing a summary of how my experience as an assistant principal has prepared me for a principal position … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
1. Write a program that uses a while statement to produce
1. Write a program that uses a while statement to produce the sum 1+2+3+ ...+n, where a value for n is entered by the user. It assumes that integer variables i, n and sum have been declared. 2. Write … read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,867 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x