+ 1

Can you guys help me? PTHYON

Fix this please. 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")

6th Mar 2022, 2:26 AM
Bluegray
Bluegray - avatar
3 Answers
+ 3
#Indentation matters 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")
6th Mar 2022, 2:32 AM
JOKER
JOKER - avatar
+ 6
Coding Berries and Cream , the task can also be done without using a counter and a loop. we can use len(...) to check the number of characters that have been entered: try: name = input() if len(name) > 3: print ("Account Created") else: raise Exception except: print("Invalid Name")
6th Mar 2022, 6:01 PM
Lothar
Lothar - avatar
0
thank you!
6th Mar 2022, 2:34 AM
Bluegray
Bluegray - avatar