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
  random matrix, with some special feature PhysChem 6 397 Aug-28-2018, 07:41 PM
Last Post: PhysChem
  Random quiz generator Truman 16 2,352 Jun-01-2018, 05:23 AM
Last Post: wavic
  Divide a number - Multiple levels - Sum of all numbers equal to input number pythoneer 17 1,981 Apr-20-2018, 04:07 AM
Last Post: pythoneer
  Generating a list and a tuple Truman 3 1,389 Mar-15-2018, 09:20 PM
Last Post: wavic
  random numbers and stats cliffhop23 2 1,286 Feb-22-2018, 09:16 PM
Last Post: glidecode
  random permutation boris602 2 703 Feb-21-2018, 10:27 PM
Last Post: nilamo
  Need help displaying random color Ellicore 1 854 Feb-20-2018, 11:30 PM
Last Post: Larz60+
  Dice and Random Variables isuckatcoding 3 1,024 Dec-04-2017, 05:00 AM
Last Post: micseydel
  bubble sort random list atux_null 7 1,858 Nov-03-2017, 07:28 PM
Last Post: sparkz_alot
  NEED HELP Pseudo-Random Numbers Kongurinn 9 1,076 Oct-23-2017, 04:17 AM
Last Post: Skaperen

Forum Jump:


Users browsing this thread: 1 Guest(s)