Question: Use python 3 to let those programs return None when an invalid input appear Question 1. If the input is not a string, let it

Use python 3 to let those programs return None when an invalid input appear Question 1. If the input is not a string, let it return zerow def problem one(test_string): p=len(test_string) problem one=test_string[p::-1]+ return problem one Question 2.4 If the input is not a string, let it return zero- def problem two(test sentence): problem two-test sentence.split() return problem two Question 3. If the input is not a int & list, let it return zero- def problem threelin number, in list): problem three=in number in in list- return problem three Question 4. If the input is not a int, let it return zero- def problem four(in number): total = 0% for i in range(1, in number + 1):- total += jk return total print(problem four- Question 5. If the input is not a list let it return zero def problem fivelli one, li two):* result = 12 for num in lione: if num not in result: result.append(num) for num in li two: if num not in result: result.append(num)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
