12 Answers
New Answer3/11/2021 5:33:33 PM
Shubham Kadam12 Answers
New AnswerHi 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")
This works too: try: name = input() #your code goes here if len(name) < 4: raise ValueError except: print("Invalid Name") else: print("Account Created")
name = input() x = len(name) if x > 3: print('Account Created') else: print('Invalid Name')
try: name = input() #your code goes here if len(name)>=4: print("Account Created") else: raise Exception except: print("Invalid Name")
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!
You have to use library My English not good but i think you want to create a messager code for send and get message
try: name = input() if len(name) > 3: print("Account Created") else: raise Exception except : print("Invalid Name")
try: name = input() #your code goes here c = len(name) if c < 4: raise Exception except: print ("Invalid Name") else: print("Account Created")
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
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")
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
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message