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 309 Aug-28-2018, 07:41 PM
Last Post: PhysChem
  Random Math Text Based Game captainflint 2 697 Aug-05-2018, 05:40 PM
Last Post: ahsankhan
  Random quiz generator Truman 16 1,848 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,780 Apr-20-2018, 04:07 AM
Last Post: pythoneer
  Generating a list and a tuple Truman 3 1,043 Mar-15-2018, 09:20 PM
Last Post: wavic
  random numbers and stats cliffhop23 2 1,204 Feb-22-2018, 09:16 PM
Last Post: glidecode
  random permutation boris602 2 609 Feb-21-2018, 10:27 PM
Last Post: nilamo
  Need help displaying random color Ellicore 1 705 Feb-20-2018, 11:30 PM
Last Post: Larz60+
  printing list of random generated rectangles Zatoichi 8 1,144 Feb-18-2018, 06:34 PM
Last Post: buran
  Dice and Random Variables isuckatcoding 3 897 Dec-04-2017, 05:00 AM
Last Post: micseydel

Forum Jump:


Users browsing this thread: 1 Guest(s)