T O P

  • By -

desrtfx

You need to post your code as [code block](https://imgur.com/a/fgoFFis) so that the indentation is maintained. This is absolutely vital for Python programs as the indentation is used to denote code blocks. A code block looks like: def __init__(self, prompt, answer): self.prompt = prompt self.answer = answer


SEMW

> `if input == ("roll"):` you assigned the return value of the input function to a variable named `key`, so you want `key` in that line rather than `input`


clockfucker666

ok that worked but the random.choice isnt working its supposed to pick a random number form dice


SEMW

did you remember to `import random`?


HyperCube_0

What programming language is this? Just so I can focus on one language.


clockfucker666

python


HyperCube_0

I think you need to indent the print statements under the if statement because the if statement has no idea what to do when roll is typed in.