Explain how can you generate random numbers in python?
Answer / Amish Kumar
In Python, the random module provides functions for generating random numbers. You can use functions like random(), randint(), uniform(), and seed() to generate different types of random numbers. For example, random() returns a float number between 0.0 and 1.0, while randint(a, b) returns an integer within the range of a and b (inclusive).
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you achieve web scraping in python?
Since switch-case is not used in python – what are the replacements for switch statement in python?
Describe how multithreading is achieved in python?
What is multithreading? Give an example?
How do I run python on windows?
How to overload constructors or methods in python?
Is c++ or python better?
How do I run a py file in python shell?
Tell me how are arguments passed by value or by reference?
Explain the role of repr function.
Why do we need break and continue in python?
Explain python is one line?