Question #264942

Write a program to count the characters that are not words, integers, spaces


Expert's answer

# get the string from the user
inputString =input("");
symbols=0
# Looping through a string.
for letter in inputString:
    if (letter.isdigit()==False and letter.isalpha()==False and letter!=" "):
        symbols+=1
# Display a new string.
print(f"The characters that are not words, integers, spaces: {symbols}")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS