Python Tour2 TypeC With Aman
Python Tour2 TypeC With Aman
1. Write a program that prompts for a phone number of 10 digits and two dashes, with
dashes after the area code and the next three numbers. For example, 017-555-1212 is a legal
input. Display if the phone number entered is in a valid format or not and display if the phone
number is valid or not (i.e., contains just the digits and dash at specific places).
2. Write a program that should prompt the user to type some sentence(s) followed by 'enter'.
It should then print the original sentence(s) and the following statistics relating to the
# Print results
print("Original Sentences:")
print(str)
print("Number of words =", (spaceCount + 1))
print("Number of characters =", length)
print("Alphanumeric Percentage =", alnumPercent)