import random import time def print_random_values(): for i in range(50): # Generate a random interval between 1 and 5 seconds interval = random.uniform(0, 3) # Wait for the random interval time.sleep(interval) # Print the current value print(f"Value {i+1}") # Call the function print_random_values()