Trying to solve registration system in intermediate python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 .

30th Mar 2021, 2:09 PM
Simisola Osinowo
Simisola Osinowo - avatar
3 Answers
+ 7
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')
30th Mar 2021, 2:12 PM
Scarlet Witch
Scarlet Witch - avatar
0
Thanks for answer, I used: raise ValueError Maybe there is no difference in this case, but I did.
10th Dec 2021, 7:45 AM
Mr.Elaman Mambetaliev
- 1
Thanks it worked
30th Mar 2021, 2:21 PM
Simisola Osinowo
Simisola Osinowo - avatar