0
Shows expected indented block why what error
name=input("enter name") length=len(name) for i in range(0, length): if((name==a)or(name==e)or(name==o)or(name==i)or(name==u)): print("it has vowels") else: print("no vowles")
6 Antworten
+ 7
ya I know, just fixing his indents
+ 6
#fixed it for you, but you're gonna need to define those letter variables:
name=input("enter name")
length=len(name)
for i in range(0, length):
if((name==a) or (name==e) or (name==o) or (name==i) or (name==u)):
print("it has vowels")
else:
print("no vowles")
+ 5
@corejava
spaces
like
this
yknow?
it dictates the logic flow. if its too complex, maybe try brackets and then replace them with indents
+ 3
the inside of every block has to be indented.
if, for, while, try, except, def, elif, else, with, and I might forget some, but all of them are the head of the block (which is not indented more than what is outside of the block)
0
#fixed part with letters, but follow @Ahri for the rest
if 'i' in name or 'e' in name or 'o' in name or 'u' in name or 'a' in name:
PS : @Ahri, you can remove the 0 for range, it is implicit if not declared :)
0
@Ahri the same thing I have given right what is the difference between ur code and mine