I am currently making a survey using tkinter python and I want to know how once a user has clicked submit for the first question how do I make code that transitions it to the next question without making another python file. I need it to all run on one file. I have an image of what I have created but I want it so that when I click submit I can transition to the next question how do I code this?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

I am currently making a survey using tkinter python and I want to know how once a user has clicked submit for the first question how do I make code that transitions it to the next question without making another python file.

I need it to all run on one file.

I have an image of what I have created but I want it so that when I click submit I can transition to the next question how do I code this?

 

 

12
13 # function to display survey question
14 def display_text():
PR
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
# Initialize Labels to display question and available answer
label1 Label(win, text="You enjoyed the new statue?:", font-("Courier 22 bold"))
label2 = Label(win, text='1. strongly agree', font-("Courier 15"))
label3 = Label(win,
text='2. Agree', font=("Courier 15"))
labe14
Label(win, text='3. Neither ', font-("Courier 15"))
label5
Label(win, text='4. disagree', font-("Courier 15"))
label6 Label(win, text='5. strongly disagree', font-("Courier 15"))
=
=
label1.pack(side=TOP, anchor="w")
label2.pack(side-TOP, anchor="w")
label3.pack(side=TOP, anchor="w")
label4.pack(side-TOP, anchor="w")
labe15.pack(side-TOP, anchor="w")
labe16.pack(side=TOP, anchor="w")
ttk.Label(win, text="Enter your choice", width=20, font-("Courier 22 bold")).pack(side=TOP, anchor="w")
# Accept User Input into single line text-box
entry
Entry (win, width=40)
=
entry.focus_set()
entry.pack(side-TOP, anchor="w")
# function call
display_text()
# Create a Button to submit response
ttk.Button (win, text="Submit", width=20).pack(padx=20, pady=20, side-TOP, anchor="w")
win.mainloop()
Transcribed Image Text:12 13 # function to display survey question 14 def display_text(): PR 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 # Initialize Labels to display question and available answer label1 Label(win, text="You enjoyed the new statue?:", font-("Courier 22 bold")) label2 = Label(win, text='1. strongly agree', font-("Courier 15")) label3 = Label(win, text='2. Agree', font=("Courier 15")) labe14 Label(win, text='3. Neither ', font-("Courier 15")) label5 Label(win, text='4. disagree', font-("Courier 15")) label6 Label(win, text='5. strongly disagree', font-("Courier 15")) = = label1.pack(side=TOP, anchor="w") label2.pack(side-TOP, anchor="w") label3.pack(side=TOP, anchor="w") label4.pack(side-TOP, anchor="w") labe15.pack(side-TOP, anchor="w") labe16.pack(side=TOP, anchor="w") ttk.Label(win, text="Enter your choice", width=20, font-("Courier 22 bold")).pack(side=TOP, anchor="w") # Accept User Input into single line text-box entry Entry (win, width=40) = entry.focus_set() entry.pack(side-TOP, anchor="w") # function call display_text() # Create a Button to submit response ttk.Button (win, text="Submit", width=20).pack(padx=20, pady=20, side-TOP, anchor="w") win.mainloop()
Survey Question
You enjoyed the new statue?:
1. strongly agree
2. Agree
3. Neither
4. disagree
5. strongly disagree
Enter your choice
Submit
T
X
Transcribed Image Text:Survey Question You enjoyed the new statue?: 1. strongly agree 2. Agree 3. Neither 4. disagree 5. strongly disagree Enter your choice Submit T X
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY