Write a recursive method named editDistance that accepts string parameters s1 and s2 and returns the "edit distance" between the two strings as an integer. Edit distance (also called Levenshtein distance) is defined as the minimum number of "changes" required to get from s1 to s2 or vice versa. A "change" can be defined as a) inserting a character, b) deleting a character, or c) changing a character to a different character. Call Value Returned editDistance("driving", "diving") 1 editDistance("debate", "irate") 3 editDistance("football", "cookies") 6

Answers

Answer 1

Answer:

Explanation:

The following code takes in the two parameters s1 and s2 and returns the Levenshtein distance of the two strings passed.

def editDistance(s1, s2):

   m = len(s1) + 1

   n = len(s2) + 1

   arr = {}

   for x in range(m):

       arr[x, 0] = x

   for y in range(n):

       arr[0, y] = y

   for x in range(1, m):

       for y in range(1, n):

           proc = 0 if s1[x - 1] == s2[y - 1] else 1

           arr[x, y] = min(arr[x, y - 1] + 1, arr[x - 1, y] + 1, arr[x - 1, y - 1] + proc)

   return arr[x, y]

Write A Recursive Method Named EditDistance That Accepts String Parameters S1 And S2 And Returns The

Related Questions

A student is writing a research paper about the poetry of the Harlem Renaissance. Which style guidelines will the
student most likely follow when writing about this topic?
-American Chemical Society (ACS)
-Modern Language Association (MLA)
-Council of Science Editors (CSE)
-American Psychological Association (APA)

Answers

Answer:

b

Explanation:

lesssss gooo CLOUWT

The style guidelines that the student is most likely to follow when writing about the poetry of the Harlem Renaissance is Modern Language Association (MLA). The MLA style is commonly used for writing in the humanities, including literature, language, and cultural studies.

What is Modern Language Association (MLA)?

The Modern Language Association (MLA) is a professional organization for scholars of language and literature. It is mainly focused on the study and teaching of languages and literature, particularly in the United States.

The MLA publishes several academic journals, including the flagship journal PMLA (Publications of the Modern Language Association of America), and produces a well-known academic writing style guide called the MLA Handbook for Writers of Research Papers.

This handbook provides guidelines for how to format academic papers and how to properly cite sources in research writing.

To know more about Modern Language Association (MLA):

https://brainly.com/question/2031731

#SPJ2

What does a computer program use as a means to evaluate a condition as True or False?

Answers

Answer:

true

Explanation:

Answer:

A Boolean expression.

Explanation:

A Boolean expression is a logical statement that is either TRUE or FALSE . Boolean expressions can compare data of any type as long as both parts of the expression have the same basic data type.

Each contestant auditioned her singing voice for the pageant. Participle: Word it Modifies:​

Answers

Answer:

participle is singing

word it modifies is voice

can someone tell me what to do i’m kinda stuck and don’t know what he’s telling me to do pls ill give brainlist and points

Answers

Answer:

Well a debtor is basically someone owing someone money, basically someone in debt. He’s telling cup head boy to take care of the people who owe him or someone else their or his money. Thats basically it.

Which of these are characteristics of a Python data type? Check all that apply.

A Python data type is weakly typed.

A Python data type can have numeric values.

A Python data type can be shown by keys and values within brackets [ ].

A Python data type must be stated before it can be used in a program.

A Python data type can be a string, a list, or a tuple with items that can be repeated using the asterisk ( * ).

A Python data type can be a dictionary that can be updated, changed, or removed.

A Python data type cannot have connecting sets of characters separated by commas.

Answers

Answer:

A Python data type is weakly typed.A Python data type can have numeric values.A Python data type can be shown by keys and values within brackets [ ].A Python data type can be a string, a list, or a tuple with items that can be repeated using the asterisk ( * ). A Python data type can be a dictionary that can be updated, changed, or removed.

Match the roles to the task they perform.

gather requirements
create software framework
identify errors in the software
develop program code for software

Role

software architects
business analysts
programmers
testers

Answers

Software Architects: “develop program code for software”

Business Analysts: “gather requirements”

Programmers: “create software framework”

Testers: “identify errors in the software”

A security hole is a(n): Group of answer choices packet-level firewall small peep-hole in a door or wall to allow a security guard to examine an individual before allowing that individual access to a secure area or location malfunction or bug in an application program that allows data to be seen or accessed by unauthorized users missing or absent protected mode addressing restrictions on user programs during multitasking or multithreaded program execution ANI system

Answers

Answer: malfunction or bug in an application program that allows data to be seen or accessed by unauthorized users.

Explanation:

A security hole is the malfunction or bug in an application program that allows data to be seen or accessed by unauthorized users.

A security hole is regarded as a software flaw that allows someone who isn't authorized to have access to the system. This vulnerability can be taken advantage of by a hacker or other threat factors.

Which tab automatically becomes available after inserting a text box? Drawing Tools Insert Text Box Tools Shape Tools

Answers

Answer:

insert text box

Explanation:

Explanation:

format tab

Explanation: when you draw a text box a new tab called the format tab appears. it contains tools to design and format and modify the text box.

This type of peripheral is used to interact with, or send data to, the computer.


Answers

Answer:

Input

Explanation:

20 POINTS-
can someone help with this?

Answers

Answer:

large storage= data warehouse

data from daily= world wide

data storaage= transactional

online data= relational

I rlly don't know I'm kinda guessing here for don't take my word to heart it's been a bit since I've learned this

3. Maria is in charge of consolidating the names of the participants of the two-day virtual
seminar. She wants to arrange the names alphabetically using MS Excel. Which of the following is
the correct sequence of steps in sorting text?
1. Click the Sort & Filter command. A drop down menu appears.
11. Choose Sort A to Z.
III. Select the cell range needed to be sorted.
IV. Go to the Editing Styles group of Home Tab.
A. I, II, III and IV
C. III, IV, I and I
B. II, II, IV and I
D. IV, l, ll and I​

Answers

Answer:

The correct sequence of steps in sorting text is;

III, IV, I and II

Which is option 'C' where the last item is II

C. III, IV, I and II

Explanation:

Sorting is the orderly arrangement of items (data) according to a specified criteria such as arranging a list of items alphabetically or a numerical arrangement of a data collection

Filtering is the selection for display, data that meets a specific condition

To arrange the names of the participants of the two-day virtual seminar alphabetically using MS Excel the sequence of steps are;

1. Select the rows or columns the are to be sorted by using steps for selecting  rows and/or columns

2. Go to the Editing group of the Home Tab ribbon

3. Click on (the down arrow besides) the Sort & Filter command icon to display a drop down menu with options for type of sorting and filtering

4. Choose Sort A to Z to sort the contents of the cell range in increasing alphabetical order

Therefore, the correct sequence of steps are;

III. Select the cell range needed to be sorted

IV. Go to the Editing Styles group of the Home Tab

I. Click the Sort & Filter command. A drop down menu appears

II. Choose Sort A to Z.

The correct sequence is III, IV, I and II.

Match each of the following terms to its definition: I. web-based II. open source III. project management IV. personal information manager V. proprietary A. software used to keep track of appointments B. software that is hosted on a website C. software used to track tasks and coordinate resources D. software which must be purchased E. software code that is freely available

Answers

Answer:

A. Personal information manager.

B. Web-based.

C. Project management.

D. Proprietary.

E. Open source.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

Simply stated, it is a computer program or application that comprises of sets of code for performing specific tasks on the system.

Basically, softwares are categorized into the following categories;

A. Personal information manager: software used to keep track of appointments. It can be used to schedule and manage schedules easily.

B. Web-based: software that is hosted on a website. It works based on cloud computing services and as such requires the use of internet for use at all times.

C. Project management: software used to track tasks and coordinate resources.

D. Proprietary: software which must be purchased. It also known as a closed-source software and can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer. Thus, it is typically published as a commercial software that may be sold, licensed or leased by the software developer (vendor) to the end users with terms and conditions.

Some examples of proprietary software are Microsoft Windows, macOS, Adobe photoshop etc.

E. Open source: software code that is freely available. It is typically published as a free software that may be downloaded on various platforms by the end users.

Following is the matched solution for the given question.

I. Web-based - B. software that is hosted on a websiteII. Open source - E. software code that is freely availableIII. Project management - C. software used to track tasks and coordinate resourcesIV. Personal information manager - A. software used to keep track of appointmentsV. Proprietary - D. software which must be purchased.

I. Web-based software refers to applications or programs that are accessed and used through a web browser. Instead of being installed on individual computers, the software is hosted on a server and accessed remotely over the internet.

II. Open source software refers to software whose source code is made available to the public. It can be freely used, modified, and distributed by anyone.

III. Project management software is designed to help teams and individuals manage projects efficiently. It assists in planning, organizing, and tracking tasks, resources, and timelines.

IV. Personal information manager (PIM) software is used to organize personal information such as appointments, contacts, notes, and tasks. It helps individuals manage their schedules, track important dates, and maintain personal productivity.

V. Proprietary software refers to software that is privately owned and controlled by a company or individual. It is typically distributed under licensing agreements, and users must purchase or obtain the necessary licenses to use the software.

Learn more about web-based software here:

brainly.com/question/4560046

#SPJ6

Which print preview of your slide show includes a notes section for your audience?

Answers

Answer:

I would say the one on the left side, have a good day! :)

Explanation:

I hope this helps! :)

BE CAREFUL OF SCAM LINKS HERE
check attached bcuz brainly freak block this

also i love u grammarly

Answers

Answer:

I know what the scam links look like and to be careful. Thanks for warning us though. Have a awesome day!

Explanation:

Answer:

have u watched euphoria

Explanation:

lol

1. What is a Network?

A.an arrangement of intersecting horizontal and vertical lines.

B.a group or system of interconnected people or things.

C.files on a computer

D.a device drive used to carry information




Answers

B. a group or system of interconnected people or things

test unit 8 edhesive answers ​

Answers

What are the questions

Which of these devices features D-pads and analog sticks? ASAP PLEASE
A. smartphones
B. portable consoles
c. PDAS
D. feature phones
E. tablets

Answers

Answer:

b. portable consoles

Explanation:

hope that helps :)

Answer:

b - portable consoles

Explanation:

PLATO

What is an "Expert System"?

If you can’t answer pls leave It

Answers

Answer:

program that use artifical intelligents

Explanation:

Expert system, a computer program that uses artificial-intelligence methods to solve problems within a specialized domain that ordinarily requires human expertise.

PLEASE HELP ME ASAP I HAVE AN EXAM SOON!!!!

My ET-2600 printer isn't working. Black and white pages aren't printing, and if I try to print a BW page, it only print a blank sheet of paper.

How to fix?! I have checked the nozzle thingy on the app.

Answers

Answer:

try seeing if the nozzle of the cartridge is clogged

Explanation:

Suppose cell C5 contains the formula =B$6+C1.


Match each formula with its respective cell if you copied it.


=A$6+B4 =B$6+C6 =C$6+D2 =D$6+E1


Thank you, have a great week.

Answers

Answer:

=A$6+B4 will be in B8

=B$6+C6 will be in C10

=C$6+D2 will be in D6

=D$6+E1 will be in E5

Explanation:

$ sign is used to lock a certain column or row value, with the $ sign we can create an absolute reference which will remain unchanged as we copy our formula from one cell to another.

As formulars are copied, the references change respectively.

With =B$6+C1 in C5 ; As we move up or down of cell C5, only the row numbers will change that is formula in C6 becomes =B$6+C2.

As we move left and right, the column alphabet will also experience change like the rows did.

Only the absolute reference won't change no matter the direction.

Hence,

=A$6+B4 ; A and B means one move to the left of C5 and 4 signifies, 3 moves downward of C5 that gives B8

=B$6+C6 ; B and C means no horizontal change, 6 means 5 moves downward of C5 which gives C10

=C$6+D2 ; C and D means 1 move to the right and 2 means one move downward of C5 which gives D6

=D$6+E1 ; D and E means 2 moves to the right and 1 means no vertical change from C5 ; which gives E5

Hardware refers to programs and protocols used on a computer system.

True
False

Answers

Answer:

False

Explanation:

Answer:

false

Explanation:

i JUST took the quiz

Use the drop-down menus to match each description with the part of a report where it is located.

named moons in the solar system:
page number printed at the bottom of page 1:

page number printed at the bottom of page 20:

group of data titled “Hawks” in a report on species of migrating birds:

report titled “Technology in the Workplace”:

calculation printed beneath a group of data:

date of a report printed at the top of pages 2–100:

Answers

Answer:

1) Detail

2) Report footer

3) Page footer

4) Group Header

5) Report header

6) Group footer

7) Page header

Explanation:

I just did the assignment

Hardware failure, power outages, and DOS attacks will affect:

data confidentiality.

data integrity.

data verification.

data availability.

Answers

Answer:

The answer should be data availability

Twenty staff members will be doing data entry activities from 10 p.m. to 3 a.m. on a regular basis. You could check if a given operating system will handle this activity by performing _____.

soak testing.
stress testing
load testing
spike testing

Answers

Answer:

load testing

Explanation:

to see if the activity can handle under performance

JAVA

Write a method that takes an ArrayList of Strings, and an int numRepeats and returns a new ArrayList with the original ArrayList repeated numRepeats times.


For example if we had an ArrayList list with the values ["a", "b", "c"]:


repeatArrayList(list, 3)

Should return a new ArrayList with the elements:


["a", "b", "c", "a", "b", "c", "a", "b", "c"]


public ArrayList repeatArrayList(ArrayList list, int numRepeats)

{

}

Answers

Answer:

Explanation:

The following code is written in Java. It creates a function that takes in an ArrayList and an int parameter. Then it loops through the array and adds each element into a new array called newList but adds them the number of times that the numRepeats argument states. Output can be seen in the attached image below.

import java.util.ArrayList;

class Brainly{

   public static void main(String[] args) {

       ArrayList list = new ArrayList();

       list.add('a');

       list.add('b');

       list.add('c');

       ArrayList newList = repeatArrayList(list, 3);

       System.out.println(newList);

   }

   public static ArrayList repeatArrayList(ArrayList list, int numRepeats) {

       ArrayList newList = new ArrayList();

       for (int x = 0; x < numRepeats; x++) {

           for (int i = 0; i < list.size(); i++) {

               newList.add(list.get(i));

           }

       }

       return newList;

   }

}

The students start the school year with the same number of crayons and markers in their supply boxes. They count the number of these supplies remaining at the end of the school year. Here is a bar chart showing the data the students collected. Predict the three colors of crayons and markers the class will use the most next year.

Answers

Answer:

Hello :P AAAAAAAAAAAAAAAAAAAAAAAAA

9.6 Code practice Edhesive

Answers

Answer:

N = [1,1,1,1,1],

[2,2,2,2,2],

[3,3,3,3,3],

[4,4,4,4,4]

def printIt(ar):

   for row in range(len(ar)):

       for col in range(len(ar[0])):

           print(ar[row][col], end=" ")

       print("")

           

N=[]

for r in range(4):

   N.append([])

   

for r in range(len(N)):

   value=1

   for c in range(5):

       N[r].append(value)

       value=value + 1

           

printIt(N)

print("")

newValue=1

for r in range (len(N)):

   for c in range(len(N[0])):

       N[r][c] = newValue

   newValue = newValue + 1

       

printIt(N)

Explanation:

I got 100%.

In this exercise we have to use the knowledge of computational language in python to write the code.

We have the code in the attached image.

The code in python can be found as:

def printIt(ar):

  for row in range(len(ar)):

      for col in range(len(ar[0])):

          print(ar[row][col], end=" ")

      print("")        

N = [1,1,1,1,1], [2,2,2,2,2], [3,3,3,3,3], [4,4,4,4,4]

for r in range(4):

  N.append([])

for r in range(len(N)):

  value=1

  for c in range(5):

      N[r].append(value)

      value=value + 1

printIt(N)

print("")

newValue=1

for r in range (len(N)):

  for c in range(len(N[0])):

      N[r][c] = newValue

  newValue = newValue + 1

printIt(N)

See more about python at brainly.com/question/26104476

Which game would be classified as an advergame?
A.
Tomb Raider
B.
Fifa Soccer
C.
Prince of Persia
D.
Flower

Answers

Answer:

B. Fifa Soccer

Explanation:

That should be your answer.

A style sheet consists of CSS ______________________ that specify the layout and format properties to apply to an element. *

Answers

so the word your looking for is Properties so it would be

A style sheet consists of CSS Properties that specify the layout and format properties to apply to an element. *

scav

Why do chloroplasts appear only in plant cells and lysosomes appear only in animal cells?

Answers

Answer:

Both animal and plant cells have mitochondria, but only plant cells have chloroplasts. ... Because animals get sugar from the food they eat, they do not need chloroplasts: just mitochondria.

Other Questions
Solve for x given the picture I need an explanationWill mark brainliest Select the correct responses: Cules son los 3 usos de se mencionados en el video?Question 10 options:Los pronombres de doble objetoVerbos como gustarEl "se" impersonalLos pronombres demonstrativosEl "se" transitivoVerbos reflexivos y recprocos Please help me with 1,2,3,4,5,6,7,8,9,10,11 please I really need help explain how the genus and species name of an organism is properly written Explain what benefits you can achieve while performing either exercise? I needddd helppppp !!!whats the answer ? Which linear equation is written in slope-intercept form? Does the timing of a tsunami affect its impact? A 1.5m tall boy casts a 3m shadow. Calculate the height of a tree that simultaneously casts an 8m shadow. Please help choose oneA B C or D??? I have 3 Health questions about babies and pregnancies if any ladies can help me with these questions. Im failing this class and need to majorly bring my grade up. If there are any ladies that can help me with these's questions I'll give them Brainliest. ( Please only answer if you can actually help). I also have English questions to anyone can help with those questions. Im also failing English to. Just click on my name and go to my questions. Knives should be stored in cluttered drawers.True or false Consider the Tips for Responsible Financial Decisions discussed in this module. Using some of these tips, what advice would you give Brian on at least one of his financial decisions? How will your advice help Brian reach his financial goal? What is the volume of the square pyramid, in cubic inches? PLZZZZ HELP ME ,Plsss most of the people in Africa live in the savannah. list a few reasons as you can to explain this pattern of population density. The radius of a circle measures 11cm. what is the circumference of the circle? The polynomial is (x-2) is a factor of the polynomial 4x^2-6x-4 A. TrueB. False A survey asked 100 adults about car ownership and ride-sharing apps. Of the 38 people without a car, 29 have ride-sharing app on their phone. A total of 47 people have a ride-sharing app on their phone.What percentage of people surveyed who own a car have a ride-sharing app on their phone? Round to the nearest whole percent.Enter the correct answer in the box. A wave has a frequency of 30Hz and wave length of 40cm. What is the velocity of the wave?