Python Forum
About the random number generating
Thread Rating:
  • 4 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About the random number generating
#1
My intention is to generate specific number of random integers between the lowest limit and the highest limit. I know I need to use random to generate it.
to do that, I got the seed=13, count of numbers=51, lowest=-19, highest =19.
However, when I ran my python code, its result is not the same as the one that our teacher gave us. There is no error showed up when running the code and the format is correct. Is that possibly because of the different version of python? or the virtual machine? Or actually it is because of my code? Thanks!
Reply
#2
(Jan-12-2019, 03:54 AM)shang2019 Wrote: However, when I ran my python code, its result is not the same as the one that our teacher gave us. There is no error showed up when running the code and the format is correct. Is that possibly because of the different version of python? or the virtual machine? Or actually it is because of my code?

what is expected result/the one teacher gave you?
What is your result?
What is your code?
What python version is used at school/at home?
What virtual machine?

Unfortunately the crystal ball is not part of our inventory yet. :-)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
post the code please
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help - random number/letter guessing game juin22 1 3,152 Aug-16-2020, 06:36 AM
Last Post: DPaul
  Optimisation the rejection method of generating random variables Hummingbird 2 2,339 Apr-21-2019, 01:02 PM
Last Post: priyanshu
  trying to get my random number guessing game to work! NEED HELP RaZrInSaNiTy 4 6,731 Oct-06-2016, 12:49 AM
Last Post: tinabina22

Forum Jump:

User Panel Messages

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