Programming : recusrion python 33, programming homework help

i want a recursive function that takes in a grid (a 2d list) of  X's and an f or two like for example:

X X X X X X X X X X X

F X X X X X X X X X X

X X X X X X X X X X X

X X H X X X X X X X X

X X X X X X X X X X X

X X X X X X X X X X X

X X X X X X X X X X X

X X X X X X X X X X X

X X X X X X X X X X X 

the H is stands for house. the recursive function should check the neighboring locations close around F (north, south, east, and west) and then the function should change the X's that neighbor the F to F's and change the old F to D like this:

  F  X  X  X  X  X  X  X  X  X  X

  D  F  X  X  X  X  X  X  X  X  X

  F  X  X  X  X  X  X  X  X  X  X

  X  X  H  X  X  X  X  X  X  X  X

  X  X  X  X  X  X  X  X  X  X  X

  X  X  X  X  X  X  X  X  X  X  X

  X  X  X  X  X  X  X  X  X  X  X

  X  X  X  X  X  X  X  X  X  X  X

  X  X  X  X  X  X  X  X  X  X  X

F's can only move one space at  a time and i should be able to control howmany times it runs but that doesnt nessarly need to be in the function itself

use example file as guide

Answers

Related Questions

Epidemiology Unit 3 Assignment 2 ERGONOMICS...

I WILL DO THE VOICE OVER.  Assignment Purpose:To locate research studies on ergonomicsAssignment DescriptionStep One: Perform a library search and lo...

FOR Phyllis Young ONLY Essay Assignment 1: Crimin...

 Assignment 1: Criminal Conduct and Criminal LawDue Week 4 and worth 140 pointsAccording to the text, crime has been part of the human condition sinc...

sociology...

   Answer each in at least  75 words.1.reasoning: PBS Crash CourseConsidering your research questions, how could you use an inductive approach? How...

10 minute Powerpoint...

 I need a power point about "Understanding WHY GOOD Communication is Important" I need to be able to have enough information to talk for 10 minutes l...

Develop a Proposal for a New Employee Onboarding P...

Due Saturday, August 4, 2018. 10-15 pages - See attachment of Instructions  Your proposal must include the following elements (not necessarily in t...

m1a3...

 Throughout this course, you will conduct a strategy audit for a selected company. Begin this assignment by selecting an organization for your course...

BUSINESS PLAN: FINANCIALS- 30hrs...

I want a professional to do the financial estimations for the Business plan. Read the background of my business plan (company) from abstract to where...

Parts unknown...

The idea of using entertainment to teach people about the world is certainly not new. Over 15 years ago, Anthony Bourdain joined the Travel Channel co...

Change Process Proposal...

Due Saturday, August 4, 2018 8-10 pages - See attachments for instructions Introduction = 2 pagesNeed for Change = 3 pages Proposed Solution = 3-5...

Journal review...

hey there I need this  journal article reviewed in about 400 words with the following prompts :What is the title of the article, the journal in which...

Have You Experienced a Failure?...

For your assignment this week, in 2-3 pages think of a work-related failure that you experienced or you are aware of and after describing it, answe...

Refine the wedding planning WBS, Create a Task Pla...

Based on feedback from your WBS submission, and the readings you have completed, refine your WBS into a Task Plan. In this phase, ensure that the sequ...

Political Science 7-10 page prospectus for an orig...

  1. Due 7/29/18 at 8pm pacific standard time (1 page)Work on refining your research question(s), the variables suggested by your question, and how...

Health Care Facility Design and Resource Managemen...

Deliverable Length:  3 pages  Excluding cover page, abstract page, and reference page Using the information you have gathered about types of healt...

Bullying prevention -6th Grade level-...

  When completing the teaching plan, students should consider the age and developmental level of the group they will be teaching. What is their atte...

HR 2...

Imagine you are an HR manager, and you have been challenged with the task of reducing expatriate turnover. Think of one or two (1-2) strategies to acc...

2100 word paper...

  Examining TheoryIn this assignment, you have the opportunity to examine the theoretical principles associated with sociological perspectives of cr...

weekend...

 Do your own research and describe what “diaspora” means. Talk to somebody you know from a different culture and ask various questions to learn a...

Fix and add to report...

You are to fix and complete the report below. You are to take the current draft add 8 to 10 pages and revise the current report to complete it.  The...

american history...

   Week 6 Discussion     Collapse        Overall Rating:  12345Your Rating:  12345 Review the materials shown in Section 1 of this wee...

Role of Marketing in Learning Programs...

 Write a 700- to 1,050-word paper in which you define integrated marketing communications and the role it plays in program developmentProvide inte...

Written English test...

Hello im looking for a tutor who knows English very welli have a test and it has 25 mins limit. The test include grammar and writing and maybe readin...

Unit 3: Assignment (Read Carefully)...

This Assignment has two parts. Part 1 has questions about probability calculations. Part 2 has questions about hypothesis testing. You will use Excel...

Discussion Board Help...

 Thread Prompt: Answer the following question in a post of approximately 200-250 words.For this first discussion board, present an important passage...

If you didn't find the right answer

Ask Your Questions, We'll notify you once someone answers it