0
I want this to take the name given, then repeat it giving it's length and recognize whether the input is numerical or alphabetic
def rep(e): x=input() y=str.x print (y) inp=input("Give me a name: ") x=len(inp) if x<10: print ('Your name has less \n than 10 letters') else: print ('Your name has more \n than 10 letters')
2 Respuestas
0
you can use isdigit func. to check if input is integers
and isalpha func. to check if input is all alphabets
0
I don't quite get it what you mean by "then repeat it"
I can write the code to check alphabet or number if you want without string functions