Question: using python 3:I always rate my answer 6. Use Python STRING methods for these: - For a name which will always begin with Mr. or
using python 3:I always rate my answer
6. Use Python STRING methods for these:
- For a name which will always begin with Mr. or Mrs., or Ms., use a PYTHON string method to determine if the person is male or female.
- For an email address use a PYTHON string method to determine if it is an educational site (.edu) , a government site (.gov), a business (.com), or a non-profit (.org).
7. Suppose tmp contains a string that indicates cost of an item, and it contains a leading $ and may contain commas and one period. Example: tmp = $5,234. Write Python code to remove the dollar sign and comma from tmp, change it to a number and double it.
8. Write Python to print the number of vowels in a sentence entered by the user.
9. Write a function called myFind which accepts a 2 strings as parameters (tmp and strToFind) and returns the location of the first occurrence of strToFind in tmp . You may NOT use Pythons built-in find OR rfind OR index functions.
10. Write a function called myIsDigit which accepts a single parameter (a string) and returns True if every character in the string is a digit and False otherwise. You may NOT use Pythons isdigit method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
