Apr-04-2017, 04:35 AM
Hi,
first of all, I hope I'm in the right section of the forum.
I decided to learn a programming language and some Youtube videos later, I decided to go for Python.
As a child I used to play around with basic on the C64 and I had some contact to free pascal lately.
So, I think the best way to start for me is to play around with Python. Write little programs for fun like I did back when I was a child.
So, here is my problem. I want to generate random numbers, to simulate a dice roll, for example.
I the Python 3.6.0 documentation I found:
9.6. random - Generate pseudo-random numbers
I read through it and tried out various things but I always get error messages.
My goal was to have a variable get a random value.
So, how is that done? Can someone help me with that?
Thank you! :-)
Sven
first of all, I hope I'm in the right section of the forum.
I decided to learn a programming language and some Youtube videos later, I decided to go for Python.
As a child I used to play around with basic on the C64 and I had some contact to free pascal lately.
So, I think the best way to start for me is to play around with Python. Write little programs for fun like I did back when I was a child.
So, here is my problem. I want to generate random numbers, to simulate a dice roll, for example.
I the Python 3.6.0 documentation I found:
9.6. random - Generate pseudo-random numbers
I read through it and tried out various things but I always get error messages.
My goal was to have a variable get a random value.
So, how is that done? Can someone help me with that?
Thank you! :-)
Sven