How JustAnswer Works:

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

Ask Ingo U Your Own Question

Ingo U
Ingo U, Software Engineer
Category: Homework
Satisfied Customers: 475
Experience:  Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Type Your Homework Question Here...
Ingo U is online now
A new question is answered every 9 seconds

Word find

Resolved Question:

Using two dimensional data.


Write a python function called find_words that finds and prints the list of valid words in a two-dimensional word puzzle.


The input arguments for this function are:


input_puzzle # XXXXX string of characters with NxN characters


valid_words_list: # XXXXX list of valid words separated by white spaces.


The function, find_words, should print the formatted original puzzle, the list of the valid words, and the formatted solved two-dimensional puzzle in capital letters (by removing all the unused characters). You should also write a main program that reads two files: input_puzzle.txt # XXXXX file contains the input puzzle as a string of characters.


valid_words.txt # XXXXX file contains a string of valid words (separated by spaces) See example below.


Example:


If the file input_puzzle.txt contains:


chzratytt


and the file valid_words.txt contains:


dog cat bird hello rat


then your main program should read the two input files and call the function find_words .


 


The function should then print the following formatted output:


Original puzzle:


| c | h | z |


| r | a | t |


| y | t | t |


Valid words in the puzzle are:


cat


rat


Solved puzzle:


| C |    |    |


| R | A | T |


|     |    | T |


 


Notes: The original puzzle should be printed as a properly formatted N rows by N columns table and it should be printed in lower case. There should be one space before and after each character.


The input_puzzle.txt file will contain N times N lower case characters. For example if the input_puzzle.txt file contains 49 characters then the puzzle will have 7 rows and 7 columns.


Only those words that exist in the valid_words.txt file are considered valid. For example the word "hat" exist in the original puzzle but since "hat" is not in the list of valid words then it is not included in the solution.


Valid words may be listed horizontally (only left to right), vertically (only top to bottom), diagonally (left to right/top to bottom ; or left to right/bottom to top) in the original puzzle.


The two-dimensional puzzle solution should be printed with all capital letters and all the unused letters should be removed (as shown above).


 


It must be Python 2.7. 


It would be great if this can be done before 12pm Central time.


--Thank you


 


Also, if anyone can keep it as simple as possible so that I, as a beginner programmer, can look over and learn from it, that would be excellent

Submitted: 8 months ago.
Category: Homework
Expert:  Ingo U replied 8 months ago.
Hello,
Could you please upload any files related to this project to wikisend.com (or a file sharing site of your choice) so I may have a look? If there are multiple files, it's easiest to put them in a compressed (zipped) folder and upload just that one item.

Thanks,
Ingo U

PS If you're not familiar with wikisend, it's easy and free:
Go to www.wikisend.com and upload the file there (no need to sign up). You will then get a page that has the File ID and Download Link. Copy either the File ID or the Download Link and come back here and paste it in your reply.
Customer: replied 8 months ago.

http://wikisend.com/download/242968/input_puzzle.txt


 


http://wikisend.com/download/710716/valid_words.txt


 


There we go. Is it possible to do this within an hour and 30 minutes? The deadline has been extended and I would greatly appreciate your help.

Expert:  Ingo U replied 8 months ago.
Here's a version that does horizontal and vertical, in case I don't get the diagonals done in time - it's tight cause I have a meeting in that timeframe. Maybe you can get partial credit with this at least:

http://wikisend.com/download/898022/puzzle_solver.py
Regards,
Ingo U
Expert:  Ingo U replied 8 months ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
Ingo U, Software Engineer
Category: Homework
Satisfied Customers: 475
Experience: Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Ingo U and 6 other Homework Specialists are ready to help you
Customer: replied 8 months ago.

Oh wow, thank you! This helps a lot.


Complete satisfaction here!

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
< Last | Next >
  • 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!!!! Alex Los 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. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, 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. Esther Woodstock, 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. Robin Elkton, 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. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience