+ 4
Why does this Python code not work
If you look at the code, I think you can tell what I am trying to do. If not, let me know here and I will explain. Try inputting âhiâ, then âbyeâ. [EDIT]: Link removed (Iâm working on another project that I donât want anyone to see.)
7 Answers
+ 3
this will work, i hope you get it
https://code.sololearn.com/cNx29fUIpT6H/?ref=app
+ 4
Pulkit Kamboj
Thank you!!!
+ 2
Arthur ,sorry for responding so late as I had hactic classes at my University so I had no time to reply, but today I had the time so you can check my recent code dice game using class and object, but if you do not want to use classes and object, then your code is nearly perfect just you should try to use random.randint instead of random.choice do this particular case.
It's happy to see you making lots of codes in recent days.
I hope my code and suggestions help you.
+ 1
Pulkit Kamboj You can use "upper.lower"(is something like this. i dont remenber at all) that make all the words in the variable (and have a command that puts only the first letter) lower so you dont have to put "Bye" or "bye"
+ 1
yes Arthur it could be solved by modifying first line as s=input(). lower () but i wanted to point out the error in the code.
+ 1
Pulkit Kamboj Oh haha.I tried to help and i got helped.Thx anyway
0
Pulkit Kamboj I think u know a lot of python.Can you see my last code and tell me if it can be shorter or more organised?