Write a Python program that uses the random module to generate a random number between 0 and 100. Return the generated number.
Example:
Input: None
Output: Random number between 0 and 100
Use the randint() function from the random module.
import random
def generate_random():
return random.randint(0, 100)
# Test the function
print(generate_random()) # Output: Random number between 0 and 100
print(generate_random()) # Output: Random number between 0 and 100
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.