Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While loop struggle
#1
How can I have a loop continue until a user presses the enter button
Reply
#2
Depends. I use wxPython for the GUI, and there is a method wx.YieldIfNeeded() that allows me to respond to button clicks
Reply
#3
I'm actually in the middle of writing a program for class with one as I read your question. The pseudocode I wrote to describe it is as follows:

# prompt user for X, assign to variable
# while X is not equal to an empty string:
# perform an action
# prompt user for X
Reply
#4
while x != "":


That's probably more helpful than pseudocode.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020