+ 15

Code for registration system python for intermediate

Please help for this code

11th Mar 2021, 5:33 PM
Shubham Kadam
Shubham Kadam - avatar
14 Respostas
+ 18
Hi this is the code.... Follows: try: name = input() #your code goes here count=0 for i in name: count+=1 if count > 3: print("Account Created") else: raise Exception except: print("Invalid Name")
15th Mar 2021, 11:29 AM
Buddha Uday Kiran
Buddha Uday Kiran - avatar
+ 5
Ok
12th Mar 2021, 11:21 AM
Shubham Kadam
Shubham Kadam - avatar
+ 4
This works too: try: name = input() #your code goes here if len(name) < 4: raise ValueError except: print("Invalid Name") else: print("Account Created")
24th Jun 2021, 8:09 PM
Sid
Sid - avatar
+ 4
name = input() x = len(name) if x > 3: print('Account Created') else: print('Invalid Name')
14th Oct 2021, 8:22 AM
Akshar Mishra
+ 3
try: name = input() #your code goes here if len(name)>=4: print("Account Created") else: raise Exception except: print("Invalid Name")
15th May 2022, 9:46 AM
Harsha Sai Ganesh Pabolu
+ 1
try: name = input() if len(name) > 3: print("Account Created") else: raise Exception except : print("Invalid Name")
18th Apr 2021, 10:51 AM
Alireza Babazadeh Serkhan
Alireza Babazadeh Serkhan - avatar
+ 1
try: name = input() #your code goes here c = len(name) if c < 4: raise Exception except: print ("Invalid Name") else: print("Account Created")
23rd May 2021, 8:18 PM
Christian Baroni
Christian Baroni - avatar
+ 1
This seems like a far simpler method of passing however I have a funny feeling this is NOT what they were trying to test us on: x = input() if len(x) < 4: print("Invalid Name") else: print("Account Created")
27th Jul 2022, 6:55 PM
Peter Haas
Peter Haas - avatar
+ 1
you can Try This if you want: try: name = input() if len(name) >= 4: print('Account Created') else: raise Exception except: print('Invalid Name')
15th Aug 2022, 9:09 AM
Nahum Abinet
0
Hi, is it possible to post either a link to the problem, or just your current solution to the problem and its guidelines, as I currently do not have access to this problem. I would love to help though!
12th Mar 2021, 11:10 AM
Kamil Hamid
Kamil Hamid - avatar
0
You have to use library My English not good but i think you want to create a messager code for send and get message
13th Mar 2021, 11:55 AM
MoX
0
This is pretty simple. You guys can try this: try: name = input() #Takes a string as a input if len(name)>=4: #To find out the length of the string print('Account Created') #Output If length of the string is more than or equal to four. else: raise ValueError #If the length of the string is less than 4, raise a Value error except: print("Invalid Name") #Ouptut when a Value error is raise
25th Aug 2021, 2:02 PM
Tain Ahmed
Tain Ahmed - avatar
- 1
This is a bit shorter using the len function that worked for me try: name = input() #your code goes here if len(name) > 3: print("Account Created") else: raise Exception except: print("Invalid Name")
26th Mar 2021, 11:26 PM
Jason
- 2
Hi this is the code.... Follows: try: name = input(bedo) #your code goes here count=0 for i in name: count+=1 if count > 3: print("Account Created") else: raise Exception except: print("bedo") please html js code hack please
23rd Mar 2021, 2:58 PM
Bedirhan Ağbaş
Bedirhan Ağbaş - avatar