I'm trying to create projects with Python and today's project was a dice roller for tabletop roleplaying games like Dungeons & Dragons. I defined a function for each type of dice from D4 to D100. I thought I structured my while loop properly with nested If/Elif statements based on the user's input. However, regardless of what the user inputs, only a D20 is ever rolled? The D20 function is the first If statement in my While loop, so my guess is that something is wrong with that line in particular:
Did I somehow write this in such a way that any input will satisfy the first If statement regardless of what was input by the user, without proceeding to check the Elif statements?
the While loop:
while not done:
diceroll = str(input("Roll the Dice! You can enter D4, D6, D8, D10, D12, D20, D100, or Custom. Q to exit:"))
print('You entered ' + str(diceroll) + ':')
if diceroll == 'd20' or 'D20':
rolld20()
elif diceroll == 'd12' or 'D12':
rolld12()
elif diceroll == 'd%' or 'D%' or 'd100' or 'D100':
rolld100()
elif diceroll == 'd10' or 'D10':
rolld10()
elif diceroll == 'd8' or 'D8':
rolld8()
elif diceroll == 'd6' or 'D6':
rolld6()
elif diceroll == 'd4' or 'D4':
rolld4()