Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is python language I need to create recursive function that checks to see if text2 contains a substring of text1. This is normal function

This is python language

I need to create recursive function that checks to see if text2 contains a substring of text1. This is normal function what I made. no commands such as .contains, .string dlicing, .startswith when you are making the function

def check(text1,text2):

if text1 =="":

return True

if text2 in text1:

return True

else:

return False

def main():

text2=str(raw_input("Enter the text2: "))

text1= str(raw_input("Enter the text1: "))

print(check(text1,text2))

main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Design a health and safety policy.

Answered: 1 week ago