+ 1
What am I missing?
input("Give me a name:") x=len(input) if x<10 print 'Your name has less \n than 10 letters' else print 'Your name has more \n than 10 letters'
4 Answers
+ 1
oh yea! thank you so much, worked like a charm
0
forgot the ':' after the if condition, and same for the else
0
barring that. I'm getting a TypeError for =len(input). Is this nnot a function I can perform? or am I doing it incorrectly?
0
ohhh right right, you need to save the input(..) in a variable, then use it, for example:
a = input()
x = len(a)