Bottom Page

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!
Quote
#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. :-)
Quote
#3
post the code please
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Optimisation the rejection method of generating random variables Hummingbird 2 118 Apr-21-2019, 01:02 PM
Last Post: priyanshu
  How to find the accuracy for Random Forest vokoyo 2 135 Apr-09-2019, 10:50 PM
Last Post: vokoyo
  random matrix, with some special feature PhysChem 6 476 Aug-28-2018, 07:41 PM
Last Post: PhysChem
  Random quiz generator Truman 16 2,704 Jun-01-2018, 05:23 AM
Last Post: wavic
  Divide a number - Multiple levels - Sum of all numbers equal to input number pythoneer 17 2,119 Apr-20-2018, 04:07 AM
Last Post: pythoneer
  Generating a list and a tuple Truman 3 1,653 Mar-15-2018, 09:20 PM
Last Post: wavic
  random numbers and stats cliffhop23 2 1,354 Feb-22-2018, 09:16 PM
Last Post: glidecode
  random permutation boris602 2 771 Feb-21-2018, 10:27 PM
Last Post: nilamo
  Need help displaying random color Ellicore 1 966 Feb-20-2018, 11:30 PM
Last Post: Larz60+
  Dice and Random Variables isuckatcoding 3 1,120 Dec-04-2017, 05:00 AM
Last Post: micseydel

Forum Jump:


Users browsing this thread: 1 Guest(s)