Trying to solve registration system in intermediate python | Sololearn: Learn to code for FREE!

0

Trying to solve registration system in intermediate python

Here is the code i ran: try: name = len(input) if name < 4 : raise ValueError print("Accounted Created") #your code goes here except: print("Invalid Name") Only three test cases seem to come out right any help would be highly appreciated .

3/30/2021 2:09:00 PM

Simisola Osinowo

3 Answers

New Answer

+5

may you try this: try: name = input() #your code goes here if len(name) < 4: raise NameError except: print("Invalid Name") else: print('Account Created')

0

Thanks it worked

0

Thanks for answer, I used: raise ValueError Maybe there is no difference in this case, but I did.