Python Forum
About the random number generating - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: About the random number generating (/thread-15298.html)



About the random number generating - shang2019 - Jan-12-2019

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!


RE: About the random number generating - buran - Jan-12-2019

(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. :-)


RE: About the random number generating - gitiya - Jan-13-2019

post the code please