How do I generate random numbers in python?



How do I generate random numbers in python?..

Answer / Manvandre Singh Chauhan

You can use the `random` module in Python. The `random()` function generates a floating-point number between 0.0 and 1.0, while `randint(a, b)` generates an integer between the two integers `a` and `b`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is class inheritance in python?

1 Answers  


What is the difference between del() and remove() methods of the list?

1 Answers  


Why is using ‘eval’ a bad practice?

1 Answers  


What do you understand by python modules?

1 Answers  


What does it mean when pandas form a group?

2 Answers  


Is python a pop or oop?

1 Answers  


Why lambda forms in python does not have statements?

1 Answers  


What is standard output in python?

1 Answers  


What is the output of the following?

1 Answers  


Is python faster than c#?

1 Answers  


How do I create a python package in pycharm?

1 Answers  


What are python templates?

1 Answers  


Categories