How to generate random numbers in python?
Answer / Vishal Sharma
To generate random numbers in Python, use the built-in module 'random'. For example: n import randomn random_number = random.randint(1, 10) - Generates a random integer between 1 and 10.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain tkinter in python
What is the difference between if and elif in python?
What is lambda in Python?
How do you represent binary and hexadecimal numbers?
What animals sleep the least?
Difference between python list comprehension vs. Map?
How to reverse a string in python
Name the function which helps to change the files permission
What is a static method in python?
How long will it take to learn python?
If you installed a module with pip but it doesn’t import in your idle, what could it possibly be?
How do you break in python?