+ 1
Beginner on Python
How to capatalize the answer given in an input statement to match with True/False or Yes/No if answer is typed in the input box as lower case true/false or yes/no? a = True octo_heart = input((T/F) "Octopuses have 3 heart? : ") If octo_heart == a print("Answer is correct") else: print("Answer is incorrect")
3 Answers
+ 2
Hello kevin, here is the corrected code :))
Use the capitalize() method to make any string's every words capitalized!
https://code.sololearn.com/cSFRuPzH1oA1/?ref=app
+ 1
Thank you very much. I will give both a try. More methods i can learn the betterđ. Thank you