Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Total beginner question
#1
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
Reply


Messages In This Thread
Total beginner question - by AngelForge - Apr-04-2017, 04:35 AM
RE: Total beginner question - by wavic - Apr-04-2017, 04:41 AM
RE: Total beginner question - by AngelForge - Apr-04-2017, 05:25 AM
RE: Total beginner question - by wavic - Apr-04-2017, 05:43 AM
RE: Total beginner question - by AngelForge - Apr-04-2017, 11:46 AM
RE: Total beginner question - by Larz60+ - Apr-04-2017, 05:24 PM
RE: Total beginner question - by Low_Ki_ - Apr-04-2017, 06:30 PM
RE: Total beginner question - by ichabod801 - Apr-04-2017, 10:30 PM
RE: Total beginner question - by Low_Ki_ - Apr-08-2017, 07:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Very Beginner question on simple variables Harvy 1 340 Apr-12-2024, 12:03 AM
Last Post: deanhystad
  A simple "If...Else" question from a beginner Serena2022 6 1,851 Jul-11-2022, 05:59 AM
Last Post: Serena2022
Question Beginner Boolean question [Guessing game] TKB 4 2,479 Mar-22-2022, 05:34 PM
Last Post: deanhystad
  Beginner question NameError amazing_python 6 2,643 Aug-13-2021, 07:28 AM
Last Post: amazing_python
  Beginner question - storing values cybertron2 4 3,351 Mar-09-2021, 04:21 AM
Last Post: deanhystad
  beginner question about lists and functions sudonym3 5 2,892 Oct-17-2020, 12:31 AM
Last Post: perfringo
  beginner question ___ 1 1,793 Jul-12-2020, 08:12 AM
Last Post: Gribouillis
  Beginner question: lxml's findall in an xml namespace aecklers 0 2,996 Jan-22-2020, 10:53 AM
Last Post: aecklers
  Super easy beginner question AkulaLA 3 3,396 Nov-07-2019, 03:42 AM
Last Post: Larz60+
  Basic Beginner question NHeav 4 2,905 Sep-13-2019, 11:43 AM
Last Post: NHeav

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020