Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
347 B
1
Indexable
Never
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)
Leave a Comment