Python Programming - Standard Libraries - Discussion
Discussion Forum : Standard Libraries - General Questions (Q.No. 68)
68.
How can you use the
random
module in Python to generate a random integer between 1 and 10 (inclusive)?
Answer: Option
Explanation:
import random
# Example usage of random module
random_number = random.randint(1, 10)
print(f"Random number: {random_number}")
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers