-
Notifications
You must be signed in to change notification settings - Fork 0
/
button.py
23 lines (22 loc) · 939 Bytes
/
button.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 9
class buttons:
def __init__(self, w, s, b):
bord_top_botm = 1 + s + len(w) + s + 1
print(f"{w} Button Specifications:\nButton name: {w}")
print("Number of the border characters for the top and the bottom: ", b)
print('Number of spaces between the left side border and the first character of the button')
print("name: ", s)
print("Number of spaces between the right side border and the last character of the button")
print("name: ", s)
print("Characters representing the borders: ", b)
print(b * bord_top_botm)
print(b + ' '*s + w + ' '*s + b)
print(b * bord_top_botm)
word = "CANCEL"
spaces = 10
border = 'x'
b1 = buttons(word, spaces, border)
print("=======================================================")
b2 = buttons("Notify",3, '!')
print("=======================================================")
b3 = buttons('SAVE PROGRESS', 5, '$')