0
Correct mezz
4 Respostas
+ 7
Akash - there is nothing to correct in this code. Sorry to say - there are more errors than lines in code. From my point of view you should go deeper in basics of python.
+ 6
Hi Akash Pawar, it's a good first try!
I believe this is what you want:
a = input("yes or no")
if a == "yes":
print("thanks")
else:
print("its ok")
I agree with Lothar that you need to go back to basics, particularly the syntax for input() and print() functions and for if: / else: statements.
You may be going through the lessons too fast. I would start over at the beginning of the lessons and work your way through them slowly. (I did.) Take your time. Practice writing your own codes for every new concept. If anything doesn't make sense, see if you can find help in the lesson comments. Use Google a lot. It helps to see each new concept from several different viewpoints, so I suggest looking them up in a few tutorials, for example,
https://www.programiz.com/JUMP_LINK__&&__python__&&__JUMP_LINK-programming
https://www.learnpython.org
https://www.tutorialspoint.com/python
https://docs.python.org/3.7/tutorial
It's a slower process but it's worth it because the knowledge you get will stick.
Keep up the good work! 😊
+ 3
Thanks to all
0
a = str(input())
if a == "yes":
print("thanks")
else :
print("its ok")
Try Using string in input operator in offline editor and revise if and else condition in tutorials🤘🏻