-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest5.py
27 lines (23 loc) · 898 Bytes
/
test5.py
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
import tkinter as tk
from tkinter import simpledialog
application_window = tk.Tk()
answer = simpledialog.askstring("Input", "What is your first name?",
parent=application_window)
if answer is not None:
print("Your first name is ", answer)
else:
print("You don't have a first name?")
answer = simpledialog.askinteger("Input", "What is your age?",
parent=application_window,
minvalue=0, maxvalue=100)
if answer is not None:
print("Your age is ", answer)
else:
print("You don't have an age?")
answer = simpledialog.askfloat("Input", "What is your salary?",
parent=application_window,
minvalue=0.0, maxvalue=100000.0)
if answer is not None:
print("Your salary is ", answer)
else:
print("You don't have a salary?")