Here is a excerpt from my program:
weaponinput = input("Would you like a rifle, a pistol, or a shotgun?")
if weaponinput == " pistol":
weapon = (int(pistol_1))
if weaponinput == " rifle":
weapon = (int(rifle_1))
if weaponinput == " shotgun":
weapon = (int(shotgun_1))
if weaponinput != (" shotgun") or (" rifle") or (" pistol") or (" sniper rifle"):
print("In your futile attempt to turn",weaponinput,"into a weapon you accidentally blow your brains accross the ground.")
The if
clause always triggers in line 8, no matter the value of weaponinput
. Why does this happen? I am using python, and do not really understand many other languages