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 odpowiedzi
+ 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')
0
Thanks for answer, I used:
raise ValueError
Maybe there is no difference in this case, but I did.
- 1
Thanks it worked