# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import random

N = 95277
x = 0.435999
s = 'TCCATATG'

AT, GC = 0, 0
for res in s:
    if res == 'A' or res == 'T':
        AT += 1
    elif res == 'G' or res == 'C':
        GC += 1

s_prob = (((1 - x)/2)**AT) * ((x/2) ** GC)

prob = 1 - (1 - s_prob) ** N

prob





StarcoderdataJupyterScriptsDedupFiltered