Skip to content
Snippets Groups Projects
Commit e6e7e914 authored by Bayan Alkhuzaei CS2023's avatar Bayan Alkhuzaei CS2023
Browse files

commit a

parents
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
import random
from letters import file2prob
import sys
file = sys.argv[1]
letters_and_probs = file2prob(file)
support = 'abcdefghijklmnopqrstuvwxyz '
probs = letters_and_probs.values()
letter = random.choices(support,probs)
print(letter[0])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment