+ 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'

14th Nov 2016, 7:42 PM
Kemuel Samuels
Kemuel Samuels - avatar
4 Answers
+ 1
oh yea! thank you so much, worked like a charm
14th Nov 2016, 8:40 PM
Kemuel Samuels
Kemuel Samuels - avatar
0
forgot the ':' after the if condition, and same for the else
14th Nov 2016, 7:53 PM
w0rmh013
w0rmh013 - avatar
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?
14th Nov 2016, 8:00 PM
Kemuel Samuels
Kemuel Samuels - avatar
0
ohhh right right, you need to save the input(..) in a variable, then use it, for example: a = input() x = len(a)
14th Nov 2016, 8:24 PM
w0rmh013
w0rmh013 - avatar