Question - A word is called a good word if all letters of the word are distinct. That is, all the letters of the word are different from each other letter. Else the word is called as a bad word!
a = input('Enter a word') flag=0 a=str(a) v = len(a) for i in range(v): b = a[i] j=i+1 for j in range(v): if(b==a[j]): flag=1 break if(flag==0): print('Good') else: print('Bad')
Enter Rajesh - It should output Good but it gives bad as output. Please help!
Replace this line with your code.