Question: Hello, please provide step-by-step instructions along with the answer. Question 1: Prohibited Character in a String (2 points) on Unix systems (as Occasionally, we might
Hello, please provide step-by-step instructions along with the answer.

Question 1: Prohibited Character in a String (2 points) on Unix systems (as Occasionally, we might want to restrict what characters a person can enter into a program--for instance, file names cannot contain these are used to separate paths), and many websites will not allow you to put spaces in your passwords. Write a program that, given a string, s, and a single character, c, determines if the string is valid (that is, string s does not contain the exact character c). Your program should return False if c is in s , and True otherwise. In [66]: def prohibitedCharacter(s, c): return ans In [67]: # Your Provided Sample Test Cases print("#1", prohibitedCharacter('I\'d like to teach the world to sing!', 'T') == True) #notice it is case sensitive print("#2", prohibitedCharacter('www.cas.mcmaster.ca', 'S') == True) print("#3", prohibitedCharacter('tom_cruise! @mcmaster.ca', '!') == False)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
