Untitled
unknown
plain_text
a year ago
347 B
3
Indexable
import random # Number of attempts num_attempts = 10 # Probability of success success_probability = 0.1 # Record the results results = [] for attempt in range(1, num_attempts + 1): if random.random() < success_probability: results.append((attempt, "Success")) else: results.append((attempt, "Failure")) print(results)
Editor is loading...
Leave a Comment