How can i fix this error
Run the code and first type sign up then answer the following question until you get a error. how can i fix this error
thanks, but not helping with my question @Coder100
yeah you were having the debugger and I had no way to run it lol @Flyingcrabs
look here, as you can see you were set it to the int
type. Did you mean to change h to an int?
h = int(h)
there you go
well i tried this not working @Coder100
well then fix it h is right now ''
''
is not a number @Flyingcrabs
in fact, why are you even converting it to a number @Flyingcrabs
I wan't to change the # by one @Coder100
make sure you are adding by str and not int @Flyingcrabs
then i tryied + str(1) there is no error but it only does it between 1 and " (Nothing)" @Coder100
yeah you set h to be nothing @Flyingcrabs
it's not allowing me to sign up either. I type sign up, it says invalid syntax.
debugger on now try @RYANTADIPARTHI
@Flyingcrabs try doing this.
file.close
file=open('password','w')
h=f
h=int(h)
h+=1
f=str(h)
maybe that will work. Try not using many variables though.
there is a new error @RYANTADIPARTHI
@Flyingcrabs that's because you are using a str
of a file to int
. Maybe try using f instead of h.
This is an example.
So under the try: you give what you want the program to do. Then if there is an error with that, then it will not shut down but it will do what is in the except:
I put ValueError next to except because I only wanted it to except a value error.
Thanks, I never knew this code line but I don't think this will help @fedoraguy300
@Flyingcrabs all right at least you know now.