Question: write by python Write a function char InWord that takes in two parameters, a char (character) and a word (string). The program will return true

write by python

write by python Write a function char InWord that takes in twoparameters, a char (character) and a word (string). The program will return

Write a function char InWord that takes in two parameters, a char (character) and a word (string). The program will return true if the character is in the word and false if it is not. If word is not a string type, or if char is not a string type, or if the length of char is greater than 1, the function should return None. Your main program should call the function and print char is in word if the function returns true, or char is not in word if the function returns false, using the user-supplied values instead of char and word. The program should print incorrect input provided if the function returns None. Ex: If the input is: a cat the output is: a is in cat Ex: If the input is: a club the output is: a is not in club Ex: If the input is: ab horse the output is: incorrect input provided LAB ACTIVITY main.py 1 def charInWord(character, word): 2. Define your function here *** 3 4 if _name__ == "_main__': 5 character = (input) 6 word = input() 7 result = charInword(character, word) 8 9 Type your code here." 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!