-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathst.py
More file actions
57 lines (46 loc) · 1.09 KB
/
st.py
File metadata and controls
57 lines (46 loc) · 1.09 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
print('o----')
print(' ||||')
price = 10
print(price)
name = 'john'
old = 21
is_new = True
name = input('what is your name? ')
color = input('what is your fav color? ')
print( name + ' likes ' + color)
na = ('izaaaaac')
print(na[1:-1])
first = 'sanco'
last = 'izac'
message = first + ' [' + last + '] is a coder'
print(message)
import tkinter as tk
counter = 0
def counter_label (lable):
def count ():
global counter
counter += 1
label.config (text=str (counter))
label.after(1000, count), count ()
phone = input("phone: ")
digits_mapping{
"0" = "one"
"1" = "one"
"2" = "two"
"3" = "three"
}
output = ""
for ch in phone:
output += digits_mapping.get (ch, "!") + " "
print(output)
root = tk.tk ()
root.title("counting seconds")
lable = tk.lable
(root,
fg ="dark green")
label.park()counter_lable
(lable)button = tk.button
(root, text = 'stop',
width = 25,
command = root.destroy)
button.pack()root.mainLoop()