+ 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")
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")
+ 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")
0
thank you!