Hey guys | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grátis
+ 1

Hey guys

I have created a program in Python which will give the information about THANOS when we enter the correct answer of one question In the output menu everything is fine it also asks about the weapon and we can enter the answer but I want such a code that the name of weapon should be fixed and if user enters wrong answr the info shall not be shown how do I do that

12th Nov 2018, 1:19 PM
VAIBHAV Aher
VAIBHAV Aher - avatar
2 Respostas
+ 9
a = input('Question?\n') if a == "Answer": print("Thanos") else: print("Wrong")
12th Nov 2018, 1:40 PM
Mert Yazıcı
Mert Yazıcı - avatar
0
No you didn't get that suppose I enter the name of enemy as thanos and name of friend as marvel so weapon name should be marthan or thanmar
13th Nov 2018, 4:43 AM
VAIBHAV Aher
VAIBHAV Aher - avatar