-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathimprimi_Input
43 lines (28 loc) · 943 Bytes
/
imprimi_Input
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
#Link para CodeSkuptor: https://py3.codeskulptor.org/#user303_mN29nkTxuRGbA1E.py
# Eco de um input field
###################################################
# O código de vocês vem aqui
import simplegui
# Handlers para input field
def get_input(text):
print(text)
pass
def input_handler(text_input):
get_input(inp.get_text())
pass
# Create frame and assign callbacks to event handlers
# Crie um frame e assinale os callbacks para os event handlers
frame = simplegui.create_frame("Echo input", 200, 200)
inp = frame.add_input("My label", input_handler, 50)
# Inicie o frame de animação
frame.start()
###################################################
# Testes
get_input("First test input")
get_input("Second test input")
get_input("Third test input")
###################################################
# Saída esperada dos testes
#First test input
#Second test input
#Third test input