-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLab1TJ.py
More file actions
33 lines (20 loc) · 776 Bytes
/
Lab1TJ.py
File metadata and controls
33 lines (20 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#-------------------------------------------------------------------------
# Lab1TJ.py
#-------------------------------------------------------------------------
# Teagan Johner
# Program name: Right Aligned Lists
#-------------------------------------------------------------------------
import random
def gen_word():
length = random.randint( 3, 15 )
valid_letters='abcdefghijklmnopqrstuvwxyz'
return ''.join(random.choice(valid_letters) for i in range(length))
def gen_list():
y = []
x = random.randint( 5, 12 )
for i in range(x):
z = gen_word
y.append(z)
print(y)
# def max_length(listOfStrings):
# def print_right_aligned():